@nativescript/core 9.0.10 → 9.0.11-next.2
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/README.md +41 -5
- package/css/package.json +36 -0
- package/css-value/package.json +23 -0
- package/package.json +86 -86
- package/LICENSE +0 -19
- package/abortcontroller/abortsignal.d.ts +0 -23
- package/abortcontroller/abortsignal.js +0 -57
- package/abortcontroller/abortsignal.js.map +0 -1
- package/abortcontroller/index.d.ts +0 -20
- package/abortcontroller/index.js +0 -52
- package/abortcontroller/index.js.map +0 -1
- package/accessibility/accessibility-common.d.ts +0 -282
- package/accessibility/accessibility-common.js +0 -416
- package/accessibility/accessibility-common.js.map +0 -1
- package/accessibility/accessibility-properties.d.ts +0 -24
- package/accessibility/accessibility-properties.js +0 -118
- package/accessibility/accessibility-properties.js.map +0 -1
- package/accessibility/index.d.ts +0 -1
- package/accessibility/index.js +0 -2
- package/accessibility/index.js.map +0 -1
- package/animation-frame/animation-native.android.d.ts +0 -1
- package/animation-frame/animation-native.android.js +0 -4
- package/animation-frame/animation-native.android.js.map +0 -1
- package/animation-frame/animation-native.ios.d.ts +0 -1
- package/animation-frame/animation-native.ios.js +0 -3
- package/animation-frame/animation-native.ios.js.map +0 -1
- package/animation-frame/index.js +0 -81
- package/animation-frame/index.js.map +0 -1
- package/application/application-common.d.ts +0 -247
- package/application/application-common.js +0 -578
- package/application/application-common.js.map +0 -1
- package/application/application-interfaces.d.ts +0 -220
- package/application/application-interfaces.js +0 -2
- package/application/application-interfaces.js.map +0 -1
- package/application/application-shims.d.ts +0 -378
- package/application/application-shims.js +0 -380
- package/application/application-shims.js.map +0 -1
- package/application/application.android.d.ts +0 -81
- package/application/application.android.js +0 -1233
- package/application/application.android.js.map +0 -1
- package/application/application.ios.d.ts +0 -145
- package/application/application.ios.js +0 -1481
- package/application/application.ios.js.map +0 -1
- package/application/helpers-common.d.ts +0 -50
- package/application/helpers-common.js +0 -153
- package/application/helpers-common.js.map +0 -1
- package/application/helpers.android.d.ts +0 -8
- package/application/helpers.android.js +0 -119
- package/application/helpers.android.js.map +0 -1
- package/application/helpers.ios.d.ts +0 -8
- package/application/helpers.ios.js +0 -24
- package/application/helpers.ios.js.map +0 -1
- package/application/index.android.d.ts +0 -2
- package/application/index.android.js +0 -3
- package/application/index.android.js.map +0 -1
- package/application/index.ios.d.ts +0 -2
- package/application/index.ios.js +0 -3
- package/application/index.ios.js.map +0 -1
- package/application-settings/application-settings-common.d.ts +0 -2
- package/application-settings/application-settings-common.js +0 -15
- package/application-settings/application-settings-common.js.map +0 -1
- package/application-settings/index.android.d.ts +0 -11
- package/application-settings/index.android.js +0 -124
- package/application-settings/index.android.js.map +0 -1
- package/application-settings/index.ios.d.ts +0 -11
- package/application-settings/index.ios.js +0 -81
- package/application-settings/index.ios.js.map +0 -1
- package/bundle-entry-points.d.ts +0 -1
- package/bundle-entry-points.js +0 -47
- package/bundle-entry-points.js.map +0 -1
- package/color/color-common.d.ts +0 -136
- package/color/color-common.js +0 -341
- package/color/color-common.js.map +0 -1
- package/color/color-types.d.ts +0 -49
- package/color/color-types.js +0 -3
- package/color/color-types.js.map +0 -1
- package/color/color-utils.d.ts +0 -38
- package/color/color-utils.js +0 -213
- package/color/color-utils.js.map +0 -1
- package/color/index.android.d.ts +0 -4
- package/color/index.android.js +0 -7
- package/color/index.android.js.map +0 -1
- package/color/index.ios.d.ts +0 -7
- package/color/index.ios.js +0 -19
- package/color/index.ios.js.map +0 -1
- package/color/known-colors.d.ts +0 -144
- package/color/known-colors.js +0 -165
- package/color/known-colors.js.map +0 -1
- package/config/config.interface.d.ts +0 -275
- package/config/config.interface.js +0 -2
- package/config/config.interface.js.map +0 -1
- package/config/index.d.ts +0 -1
- package/config/index.js +0 -2
- package/config/index.js.map +0 -1
- package/connectivity/index.android.d.ts +0 -11
- package/connectivity/index.android.js +0 -157
- package/connectivity/index.android.js.map +0 -1
- package/connectivity/index.ios.d.ts +0 -11
- package/connectivity/index.ios.js +0 -132
- package/connectivity/index.ios.js.map +0 -1
- package/console/index.d.ts +0 -14
- package/console/index.js +0 -33
- package/console/index.js.map +0 -1
- package/core-types/animation-types.d.ts +0 -11
- package/core-types/animation-types.js +0 -13
- package/core-types/animation-types.js.map +0 -1
- package/core-types/index.d.ts +0 -345
- package/core-types/index.js +0 -290
- package/core-types/index.js.map +0 -1
- package/core-types/validators.d.ts +0 -2
- package/core-types/validators.js +0 -27
- package/core-types/validators.js.map +0 -1
- package/css/CSS3Parser.d.ts +0 -184
- package/css/CSS3Parser.js +0 -534
- package/css/CSS3Parser.js.map +0 -1
- package/css/CSSNativeScript.d.ts +0 -14
- package/css/CSSNativeScript.js +0 -113
- package/css/CSSNativeScript.js.map +0 -1
- package/css/css-tree-parser.d.ts +0 -1
- package/css/css-tree-parser.js +0 -133
- package/css/css-tree-parser.js.map +0 -1
- package/css/lib/parse/index.d.ts +0 -1
- package/css/lib/parse/index.js +0 -500
- package/css/lib/parse/index.js.map +0 -1
- package/css/parser.d.ts +0 -70
- package/css/parser.js +0 -517
- package/css/parser.js.map +0 -1
- package/css/reworkcss.d.ts +0 -44
- package/css/reworkcss.js +0 -5
- package/css/reworkcss.js.map +0 -1
- package/css/system-classes.d.ts +0 -12
- package/css/system-classes.js +0 -47
- package/css/system-classes.js.map +0 -1
- package/css-mediaquery/index.d.ts +0 -27
- package/css-mediaquery/index.js +0 -118
- package/css-mediaquery/index.js.map +0 -1
- package/css-value/reworkcss-value.d.ts +0 -31
- package/css-value/reworkcss-value.js +0 -91
- package/css-value/reworkcss-value.js.map +0 -1
- package/data/observable/index.d.ts +0 -213
- package/data/observable/index.js +0 -452
- package/data/observable/index.js.map +0 -1
- package/data/observable-array/index.d.ts +0 -215
- package/data/observable-array/index.js +0 -325
- package/data/observable-array/index.js.map +0 -1
- package/data/virtual-array/index.d.ts +0 -72
- package/data/virtual-array/index.js +0 -133
- package/data/virtual-array/index.js.map +0 -1
- package/debugger/InspectorBackendCommands.d.ts +0 -1056
- package/debugger/InspectorBackendCommands.js +0 -578
- package/debugger/InspectorBackendCommands.js.map +0 -1
- package/debugger/devtools-elements-interfaces.d.ts +0 -16
- package/debugger/devtools-elements-interfaces.js +0 -2
- package/debugger/devtools-elements-interfaces.js.map +0 -1
- package/debugger/devtools-elements.common.d.ts +0 -7
- package/debugger/devtools-elements.common.js +0 -93
- package/debugger/devtools-elements.common.js.map +0 -1
- package/debugger/devtools-elements.js +0 -20
- package/debugger/devtools-elements.js.map +0 -1
- package/debugger/dom-types.d.ts +0 -24
- package/debugger/dom-types.js +0 -152
- package/debugger/dom-types.js.map +0 -1
- package/debugger/index.d.ts +0 -87
- package/debugger/index.js +0 -118
- package/debugger/index.js.map +0 -1
- package/debugger/webinspector-css.d.ts +0 -34
- package/debugger/webinspector-css.js +0 -72
- package/debugger/webinspector-css.js.map +0 -1
- package/debugger/webinspector-dom.d.ts +0 -33
- package/debugger/webinspector-dom.js +0 -75
- package/debugger/webinspector-dom.js.map +0 -1
- package/debugger/webinspector-network.android.d.ts +0 -79
- package/debugger/webinspector-network.android.js +0 -208
- package/debugger/webinspector-network.android.js.map +0 -1
- package/debugger/webinspector-network.ios.d.ts +0 -79
- package/debugger/webinspector-network.ios.js +0 -204
- package/debugger/webinspector-network.ios.js.map +0 -1
- package/fetch/index.d.ts +0 -72
- package/fetch/index.js +0 -529
- package/fetch/index.js.map +0 -1
- package/file-system/file-system-access.android.d.ts +0 -151
- package/file-system/file-system-access.android.js +0 -1162
- package/file-system/file-system-access.android.js.map +0 -1
- package/file-system/file-system-access.ios.d.ts +0 -85
- package/file-system/file-system-access.ios.js +0 -622
- package/file-system/file-system-access.ios.js.map +0 -1
- package/file-system/index.js +0 -873
- package/file-system/index.js.map +0 -1
- package/fps-meter/fps-native.android.d.ts +0 -11
- package/fps-meter/fps-native.android.js +0 -62
- package/fps-meter/fps-native.android.js.map +0 -1
- package/fps-meter/fps-native.ios.d.ts +0 -10
- package/fps-meter/fps-native.ios.js +0 -56
- package/fps-meter/fps-native.ios.js.map +0 -1
- package/fps-meter/index.js +0 -77
- package/fps-meter/index.js.map +0 -1
- package/globals/global-utils.d.ts +0 -27
- package/globals/global-utils.js +0 -67
- package/globals/global-utils.js.map +0 -1
- package/globals/index.d.ts +0 -3
- package/globals/index.js +0 -313
- package/globals/index.js.map +0 -1
- package/http/http-interfaces.d.ts +0 -84
- package/http/http-interfaces.js +0 -6
- package/http/http-interfaces.js.map +0 -1
- package/http/http-request/http-request-common.d.ts +0 -1
- package/http/http-request/http-request-common.js +0 -15
- package/http/http-request/http-request-common.js.map +0 -1
- package/http/http-request/index.android.d.ts +0 -3
- package/http/http-request/index.android.js +0 -274
- package/http/http-request/index.android.js.map +0 -1
- package/http/http-request/index.ios.d.ts +0 -3
- package/http/http-request/index.ios.js +0 -221
- package/http/http-request/index.ios.js.map +0 -1
- package/http/http-shared.d.ts +0 -3
- package/http/http-shared.js +0 -2
- package/http/http-shared.js.map +0 -1
- package/http/index.js +0 -70
- package/http/index.js.map +0 -1
- package/image-asset/image-asset-common.d.ts +0 -25
- package/image-asset/image-asset-common.js +0 -74
- package/image-asset/image-asset-common.js.map +0 -1
- package/image-asset/index.android.d.ts +0 -9
- package/image-asset/index.android.js +0 -33
- package/image-asset/index.android.js.map +0 -1
- package/image-asset/index.ios.d.ts +0 -10
- package/image-asset/index.ios.js +0 -57
- package/image-asset/index.ios.js.map +0 -1
- package/image-source/image-source-common.d.ts +0 -4
- package/image-source/image-source-common.js +0 -21
- package/image-source/image-source-common.js.map +0 -1
- package/image-source/index.android.d.ts +0 -58
- package/image-source/index.android.js +0 -371
- package/image-source/index.android.js.map +0 -1
- package/image-source/index.ios.d.ts +0 -59
- package/image-source/index.ios.js +0 -454
- package/image-source/index.ios.js.map +0 -1
- package/index.js +0 -38
- package/index.js.map +0 -1
- package/inspector_modules.d.ts +0 -7
- package/inspector_modules.js +0 -233
- package/inspector_modules.js.map +0 -1
- package/matrix/index.js +0 -45
- package/matrix/index.js.map +0 -1
- package/media-query-list/index.d.ts +0 -21
- package/media-query-list/index.js +0 -159
- package/media-query-list/index.js.map +0 -1
- package/module-name-resolver/helpers.d.ts +0 -14
- package/module-name-resolver/helpers.js +0 -27
- package/module-name-resolver/helpers.js.map +0 -1
- package/module-name-resolver/index.d.ts +0 -14
- package/module-name-resolver/index.js +0 -67
- package/module-name-resolver/index.js.map +0 -1
- package/module-name-resolver/non-bundle-workflow-compat.d.ts +0 -6
- package/module-name-resolver/non-bundle-workflow-compat.js +0 -128
- package/module-name-resolver/non-bundle-workflow-compat.js.map +0 -1
- package/module-name-resolver/qualifier-matcher/index.d.ts +0 -11
- package/module-name-resolver/qualifier-matcher/index.js +0 -141
- package/module-name-resolver/qualifier-matcher/index.js.map +0 -1
- package/platform/common.d.ts +0 -10
- package/platform/common.js +0 -14
- package/platform/common.js.map +0 -1
- package/platform/device/index.android.d.ts +0 -20
- package/platform/device/index.android.js +0 -78
- package/platform/device/index.android.js.map +0 -1
- package/platform/device/index.ios.d.ts +0 -19
- package/platform/device/index.ios.js +0 -69
- package/platform/device/index.ios.js.map +0 -1
- package/platform/index.js +0 -4
- package/platform/index.js.map +0 -1
- package/platform/screen/index.android.d.ts +0 -16
- package/platform/screen/index.android.js +0 -41
- package/platform/screen/index.android.js.map +0 -1
- package/platform/screen/index.ios.d.ts +0 -15
- package/platform/screen/index.ios.js +0 -35
- package/platform/screen/index.ios.js.map +0 -1
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSCCrypto.h +0 -79
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSCWinterTC.h +0 -20
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSString+WinterTC.h +0 -21
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Resources/Info.plist +0 -52
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Headers/NSCCrypto.h +0 -79
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Headers/NSCWinterTC.h +0 -20
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Headers/NSString+WinterTC.h +0 -21
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/Resources/Info.plist +0 -52
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSData+Async.h +0 -24
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSFileHandle+Async.h +0 -22
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSString+Async.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSLabel.h +0 -16
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSWidgets.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +0 -26
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +0 -18
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +0 -52
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSCCrypto.h +0 -60
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSData+Async.h +0 -24
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSFileHandle+Async.h +0 -22
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSString+Async.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSLabel.h +0 -16
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSProcess.h +0 -29
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSWidgets.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/UIImage+TNSBlocks.h +0 -26
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/UIView+PassThroughParent.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Modules/module.modulemap +0 -6
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/PrivateHeaders/NSObject+Swizzling.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/PrivateHeaders/UIView+PropertyBag.h +0 -18
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Resources/Info.plist +0 -52
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
- package/profiling/index.js +0 -273
- package/profiling/index.js.map +0 -1
- package/text/formatted-string.js +0 -2
- package/text/formatted-string.js.map +0 -1
- package/text/index.android.d.ts +0 -9
- package/text/index.android.js +0 -11
- package/text/index.android.js.map +0 -1
- package/text/index.ios.d.ts +0 -9
- package/text/index.ios.js +0 -11
- package/text/index.ios.js.map +0 -1
- package/text/span.js +0 -2
- package/text/span.js.map +0 -1
- package/text/text-common.d.ts +0 -12
- package/text/text-common.js +0 -111
- package/text/text-common.js.map +0 -1
- package/timer/index.android.d.ts +0 -4
- package/timer/index.android.js +0 -83
- package/timer/index.android.js.map +0 -1
- package/timer/index.ios.d.ts +0 -4
- package/timer/index.ios.js +0 -68
- package/timer/index.ios.js.map +0 -1
- package/trace/index.js +0 -255
- package/trace/index.js.map +0 -1
- package/ui/action-bar/action-bar-common.d.ts +0 -85
- package/ui/action-bar/action-bar-common.js +0 -381
- package/ui/action-bar/action-bar-common.js.map +0 -1
- package/ui/action-bar/index.android.d.ts +0 -55
- package/ui/action-bar/index.android.js +0 -502
- package/ui/action-bar/index.android.js.map +0 -1
- package/ui/action-bar/index.ios.d.ts +0 -64
- package/ui/action-bar/index.ios.js +0 -614
- package/ui/action-bar/index.ios.js.map +0 -1
- package/ui/activity-indicator/activity-indicator-common.d.ts +0 -9
- package/ui/activity-indicator/activity-indicator-common.js +0 -22
- package/ui/activity-indicator/activity-indicator-common.js.map +0 -1
- package/ui/activity-indicator/index.android.d.ts +0 -15
- package/ui/activity-indicator/index.android.js +0 -54
- package/ui/activity-indicator/index.android.js.map +0 -1
- package/ui/activity-indicator/index.ios.d.ts +0 -16
- package/ui/activity-indicator/index.ios.js +0 -54
- package/ui/activity-indicator/index.ios.js.map +0 -1
- package/ui/animation/animation-common.d.ts +0 -30
- package/ui/animation/animation-common.js +0 -239
- package/ui/animation/animation-common.js.map +0 -1
- package/ui/animation/animation-shared.d.ts +0 -84
- package/ui/animation/animation-shared.js +0 -4
- package/ui/animation/animation-shared.js.map +0 -1
- package/ui/animation/animation-types.d.ts +0 -1
- package/ui/animation/animation-types.js +0 -3
- package/ui/animation/animation-types.js.map +0 -1
- package/ui/animation/index.android.d.ts +0 -23
- package/ui/animation/index.android.js +0 -432
- package/ui/animation/index.android.js.map +0 -1
- package/ui/animation/index.ios.d.ts +0 -28
- package/ui/animation/index.ios.js +0 -808
- package/ui/animation/index.ios.js.map +0 -1
- package/ui/animation/keyframe-animation.d.ts +0 -76
- package/ui/animation/keyframe-animation.js +0 -238
- package/ui/animation/keyframe-animation.js.map +0 -1
- package/ui/builder/binding-builder.d.ts +0 -13
- package/ui/builder/binding-builder.js +0 -171
- package/ui/builder/binding-builder.js.map +0 -1
- package/ui/builder/component-builder/index.d.ts +0 -7
- package/ui/builder/component-builder/index.js +0 -219
- package/ui/builder/component-builder/index.js.map +0 -1
- package/ui/builder/index.d.ts +0 -193
- package/ui/builder/index.js +0 -643
- package/ui/builder/index.js.map +0 -1
- package/ui/button/button-common.d.ts +0 -9
- package/ui/button/button-common.js +0 -26
- package/ui/button/button-common.js.map +0 -1
- package/ui/button/index.android.d.ts +0 -29
- package/ui/button/index.android.js +0 -166
- package/ui/button/index.android.js.map +0 -1
- package/ui/button/index.ios.d.ts +0 -37
- package/ui/button/index.ios.js +0 -316
- package/ui/button/index.ios.js.map +0 -1
- package/ui/content-view/index.js +0 -87
- package/ui/content-view/index.js.map +0 -1
- package/ui/core/bindable/bindable-expressions.d.ts +0 -7
- package/ui/core/bindable/bindable-expressions.js +0 -255
- package/ui/core/bindable/bindable-expressions.js.map +0 -1
- package/ui/core/bindable/bindable-resources.d.ts +0 -2
- package/ui/core/bindable/bindable-resources.js +0 -8
- package/ui/core/bindable/bindable-resources.js.map +0 -1
- package/ui/core/bindable/bindable-types.d.ts +0 -37
- package/ui/core/bindable/bindable-types.js +0 -3
- package/ui/core/bindable/bindable-types.js.map +0 -1
- package/ui/core/bindable/index.d.ts +0 -53
- package/ui/core/bindable/index.js +0 -555
- package/ui/core/bindable/index.js.map +0 -1
- package/ui/core/control-state-change/index.android.d.ts +0 -6
- package/ui/core/control-state-change/index.android.js +0 -8
- package/ui/core/control-state-change/index.android.js.map +0 -1
- package/ui/core/control-state-change/index.ios.d.ts +0 -10
- package/ui/core/control-state-change/index.ios.js +0 -43
- package/ui/core/control-state-change/index.ios.js.map +0 -1
- package/ui/core/properties/index.d.ts +0 -114
- package/ui/core/properties/index.js +0 -1290
- package/ui/core/properties/index.js.map +0 -1
- package/ui/core/properties/property-shared.d.ts +0 -35
- package/ui/core/properties/property-shared.js +0 -16
- package/ui/core/properties/property-shared.js.map +0 -1
- package/ui/core/view/index.android.d.ts +0 -144
- package/ui/core/view/index.android.js +0 -1576
- package/ui/core/view/index.android.js.map +0 -1
- package/ui/core/view/index.ios.d.ts +0 -151
- package/ui/core/view/index.ios.js +0 -1091
- package/ui/core/view/index.ios.js.map +0 -1
- package/ui/core/view/view-common.d.ts +0 -349
- package/ui/core/view/view-common.js +0 -1147
- package/ui/core/view/view-common.js.map +0 -1
- package/ui/core/view/view-helper/index.android.d.ts +0 -9
- package/ui/core/view/view-helper/index.android.js +0 -56
- package/ui/core/view/view-helper/index.android.js.map +0 -1
- package/ui/core/view/view-helper/index.ios.d.ts +0 -67
- package/ui/core/view/view-helper/index.ios.js +0 -414
- package/ui/core/view/view-helper/index.ios.js.map +0 -1
- package/ui/core/view/view-helper/view-helper-common.d.ts +0 -11
- package/ui/core/view/view-helper/view-helper-common.js +0 -166
- package/ui/core/view/view-helper/view-helper-common.js.map +0 -1
- package/ui/core/view/view-helper/view-helper-shared.d.ts +0 -5
- package/ui/core/view/view-helper/view-helper-shared.js +0 -6
- package/ui/core/view/view-helper/view-helper-shared.js.map +0 -1
- package/ui/core/view/view-interfaces.d.ts +0 -76
- package/ui/core/view/view-interfaces.js +0 -2
- package/ui/core/view/view-interfaces.js.map +0 -1
- package/ui/core/view-base/index.d.ts +0 -597
- package/ui/core/view-base/index.js +0 -1154
- package/ui/core/view-base/index.js.map +0 -1
- package/ui/core/view-base/utils.d.ts +0 -1
- package/ui/core/view-base/utils.js +0 -9
- package/ui/core/view-base/utils.js.map +0 -1
- package/ui/core/weak-event-listener/index.js +0 -123
- package/ui/core/weak-event-listener/index.js.map +0 -1
- package/ui/date-picker/date-picker-common.d.ts +0 -28
- package/ui/date-picker/date-picker-common.js +0 -82
- package/ui/date-picker/date-picker-common.js.map +0 -1
- package/ui/date-picker/index.android.d.ts +0 -19
- package/ui/date-picker/index.android.js +0 -131
- package/ui/date-picker/index.android.js.map +0 -1
- package/ui/date-picker/index.ios.d.ts +0 -27
- package/ui/date-picker/index.ios.js +0 -165
- package/ui/date-picker/index.ios.js.map +0 -1
- package/ui/dialogs/dialogs-common.d.ts +0 -211
- package/ui/dialogs/dialogs-common.js +0 -167
- package/ui/dialogs/dialogs-common.js.map +0 -1
- package/ui/dialogs/index.android.d.ts +0 -20
- package/ui/dialogs/index.android.js +0 -330
- package/ui/dialogs/index.android.js.map +0 -1
- package/ui/dialogs/index.ios.d.ts +0 -17
- package/ui/dialogs/index.ios.js +0 -293
- package/ui/dialogs/index.ios.js.map +0 -1
- package/ui/editable-text-base/editable-text-base-common.d.ts +0 -36
- package/ui/editable-text-base/editable-text-base-common.js +0 -91
- package/ui/editable-text-base/editable-text-base-common.js.map +0 -1
- package/ui/editable-text-base/index.android.d.ts +0 -48
- package/ui/editable-text-base/index.android.js +0 -497
- package/ui/editable-text-base/index.android.js.map +0 -1
- package/ui/editable-text-base/index.ios.d.ts +0 -20
- package/ui/editable-text-base/index.ios.js +0 -255
- package/ui/editable-text-base/index.ios.js.map +0 -1
- package/ui/embedding/index.android.d.ts +0 -4
- package/ui/embedding/index.android.js +0 -14
- package/ui/embedding/index.android.js.map +0 -1
- package/ui/embedding/index.ios.d.ts +0 -1
- package/ui/embedding/index.ios.js +0 -4
- package/ui/embedding/index.ios.js.map +0 -1
- package/ui/enums/enums.js +0 -6
- package/ui/enums/enums.js.map +0 -1
- package/ui/enums/index.js +0 -6
- package/ui/enums/index.js.map +0 -1
- package/ui/frame/activity.android.d.ts +0 -1
- package/ui/frame/activity.android.js +0 -110
- package/ui/frame/activity.android.js.map +0 -1
- package/ui/frame/fragment.android.d.ts +0 -3
- package/ui/frame/fragment.android.js +0 -90
- package/ui/frame/fragment.android.js.map +0 -1
- package/ui/frame/fragment.ios.d.ts +0 -3
- package/ui/frame/fragment.ios.js +0 -4
- package/ui/frame/fragment.ios.js.map +0 -1
- package/ui/frame/fragment.transitions.android.d.ts +0 -40
- package/ui/frame/fragment.transitions.android.js +0 -679
- package/ui/frame/fragment.transitions.android.js.map +0 -1
- package/ui/frame/fragment.transitions.types.d.ts +0 -6
- package/ui/frame/fragment.transitions.types.js +0 -2
- package/ui/frame/fragment.transitions.types.js.map +0 -1
- package/ui/frame/frame-common.d.ts +0 -101
- package/ui/frame/frame-common.js +0 -688
- package/ui/frame/frame-common.js.map +0 -1
- package/ui/frame/frame-helper-for-android.d.ts +0 -37
- package/ui/frame/frame-helper-for-android.js +0 -337
- package/ui/frame/frame-helper-for-android.js.map +0 -1
- package/ui/frame/frame-helpers.d.ts +0 -16
- package/ui/frame/frame-helpers.js +0 -19
- package/ui/frame/frame-helpers.js.map +0 -1
- package/ui/frame/frame-interfaces.d.ts +0 -130
- package/ui/frame/frame-interfaces.js +0 -7
- package/ui/frame/frame-interfaces.js.map +0 -1
- package/ui/frame/frame-stack.d.ts +0 -7
- package/ui/frame/frame-stack.js +0 -41
- package/ui/frame/frame-stack.js.map +0 -1
- package/ui/frame/index.android.d.ts +0 -93
- package/ui/frame/index.android.js +0 -977
- package/ui/frame/index.android.js.map +0 -1
- package/ui/frame/index.ios.d.ts +0 -61
- package/ui/frame/index.ios.js +0 -728
- package/ui/frame/index.ios.js.map +0 -1
- package/ui/gestures/gestures-common.d.ts +0 -32
- package/ui/gestures/gestures-common.js +0 -78
- package/ui/gestures/gestures-common.js.map +0 -1
- package/ui/gestures/gestures-types.d.ts +0 -108
- package/ui/gestures/gestures-types.js +0 -40
- package/ui/gestures/gestures-types.js.map +0 -1
- package/ui/gestures/index.android.d.ts +0 -49
- package/ui/gestures/index.android.js +0 -596
- package/ui/gestures/index.android.js.map +0 -1
- package/ui/gestures/index.ios.d.ts +0 -70
- package/ui/gestures/index.ios.js +0 -510
- package/ui/gestures/index.ios.js.map +0 -1
- package/ui/gestures/touch-manager.d.ts +0 -82
- package/ui/gestures/touch-manager.js +0 -268
- package/ui/gestures/touch-manager.js.map +0 -1
- package/ui/html-view/html-view-common.d.ts +0 -12
- package/ui/html-view/html-view-common.js +0 -31
- package/ui/html-view/html-view-common.js.map +0 -1
- package/ui/html-view/index.android.d.ts +0 -27
- package/ui/html-view/index.android.js +0 -90
- package/ui/html-view/index.android.js.map +0 -1
- package/ui/html-view/index.ios.d.ts +0 -22
- package/ui/html-view/index.ios.js +0 -101
- package/ui/html-view/index.ios.js.map +0 -1
- package/ui/image/image-common.d.ts +0 -45
- package/ui/image/image-common.js +0 -195
- package/ui/image/image-common.js.map +0 -1
- package/ui/image/index.android.d.ts +0 -23
- package/ui/image/index.android.js +0 -171
- package/ui/image/index.android.js.map +0 -1
- package/ui/image/index.ios.d.ts +0 -26
- package/ui/image/index.ios.js +0 -186
- package/ui/image/index.ios.js.map +0 -1
- package/ui/image/symbol-effects-common.d.ts +0 -36
- package/ui/image/symbol-effects-common.js +0 -35
- package/ui/image/symbol-effects-common.js.map +0 -1
- package/ui/image/symbol-effects.android.d.ts +0 -5
- package/ui/image/symbol-effects.android.js +0 -8
- package/ui/image/symbol-effects.android.js.map +0 -1
- package/ui/image/symbol-effects.ios.d.ts +0 -6
- package/ui/image/symbol-effects.ios.js +0 -79
- package/ui/image/symbol-effects.ios.js.map +0 -1
- package/ui/image-cache/image-cache-common.d.ts +0 -40
- package/ui/image-cache/image-cache-common.js +0 -176
- package/ui/image-cache/image-cache-common.js.map +0 -1
- package/ui/image-cache/index.android.d.ts +0 -11
- package/ui/image-cache/index.android.js +0 -74
- package/ui/image-cache/index.android.js.map +0 -1
- package/ui/image-cache/index.ios.d.ts +0 -11
- package/ui/image-cache/index.ios.js +0 -78
- package/ui/image-cache/index.ios.js.map +0 -1
- package/ui/index.d.ts +0 -92
- package/ui/index.js +0 -80
- package/ui/index.js.map +0 -1
- package/ui/label/index.android.d.ts +0 -13
- package/ui/label/index.android.js +0 -47
- package/ui/label/index.android.js.map +0 -1
- package/ui/label/index.ios.d.ts +0 -31
- package/ui/label/index.ios.js +0 -234
- package/ui/label/index.ios.js.map +0 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.d.ts +0 -16
- package/ui/layouts/absolute-layout/absolute-layout-common.js +0 -72
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +0 -1
- package/ui/layouts/absolute-layout/index.android.d.ts +0 -6
- package/ui/layouts/absolute-layout/index.android.js +0 -26
- package/ui/layouts/absolute-layout/index.android.js.map +0 -1
- package/ui/layouts/absolute-layout/index.ios.d.ts +0 -10
- package/ui/layouts/absolute-layout/index.ios.js +0 -48
- package/ui/layouts/absolute-layout/index.ios.js.map +0 -1
- package/ui/layouts/dock-layout/dock-layout-common.d.ts +0 -14
- package/ui/layouts/dock-layout/dock-layout-common.js +0 -51
- package/ui/layouts/dock-layout/dock-layout-common.js.map +0 -1
- package/ui/layouts/dock-layout/index.android.d.ts +0 -8
- package/ui/layouts/dock-layout/index.android.js +0 -38
- package/ui/layouts/dock-layout/index.android.js.map +0 -1
- package/ui/layouts/dock-layout/index.ios.d.ts +0 -8
- package/ui/layouts/dock-layout/index.ios.js +0 -115
- package/ui/layouts/dock-layout/index.ios.js.map +0 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.d.ts +0 -126
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js +0 -403
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +0 -1
- package/ui/layouts/flexbox-layout/index.android.d.ts +0 -23
- package/ui/layouts/flexbox-layout/index.android.js +0 -152
- package/ui/layouts/flexbox-layout/index.android.js.map +0 -1
- package/ui/layouts/flexbox-layout/index.ios.d.ts +0 -44
- package/ui/layouts/flexbox-layout/index.ios.js +0 -1241
- package/ui/layouts/flexbox-layout/index.ios.js.map +0 -1
- package/ui/layouts/grid-layout/grid-layout-common.d.ts +0 -72
- package/ui/layouts/grid-layout/grid-layout-common.js +0 -358
- package/ui/layouts/grid-layout/grid-layout-common.js.map +0 -1
- package/ui/layouts/grid-layout/index.android.d.ts +0 -23
- package/ui/layouts/grid-layout/index.android.js +0 -122
- package/ui/layouts/grid-layout/index.android.js.map +0 -1
- package/ui/layouts/grid-layout/index.ios.d.ts +0 -28
- package/ui/layouts/grid-layout/index.ios.js +0 -778
- package/ui/layouts/grid-layout/index.ios.js.map +0 -1
- package/ui/layouts/index.d.ts +0 -12
- package/ui/layouts/index.js +0 -11
- package/ui/layouts/index.js.map +0 -1
- package/ui/layouts/layout-base-common.d.ts +0 -36
- package/ui/layouts/layout-base-common.js +0 -141
- package/ui/layouts/layout-base-common.js.map +0 -1
- package/ui/layouts/layout-base.android.d.ts +0 -17
- package/ui/layouts/layout-base.android.js +0 -50
- package/ui/layouts/layout-base.android.js.map +0 -1
- package/ui/layouts/layout-base.ios.d.ts +0 -13
- package/ui/layouts/layout-base.ios.js +0 -40
- package/ui/layouts/layout-base.ios.js.map +0 -1
- package/ui/layouts/liquid-glass/index.android.d.ts +0 -5
- package/ui/layouts/liquid-glass/index.android.js +0 -8
- package/ui/layouts/liquid-glass/index.android.js.map +0 -1
- package/ui/layouts/liquid-glass/index.ios.d.ts +0 -10
- package/ui/layouts/liquid-glass/index.ios.js +0 -59
- package/ui/layouts/liquid-glass/index.ios.js.map +0 -1
- package/ui/layouts/liquid-glass/liquid-glass-common.d.ts +0 -3
- package/ui/layouts/liquid-glass/liquid-glass-common.js +0 -4
- package/ui/layouts/liquid-glass/liquid-glass-common.js.map +0 -1
- package/ui/layouts/liquid-glass-container/index.android.d.ts +0 -3
- package/ui/layouts/liquid-glass-container/index.android.js +0 -4
- package/ui/layouts/liquid-glass-container/index.android.js.map +0 -1
- package/ui/layouts/liquid-glass-container/index.ios.d.ts +0 -14
- package/ui/layouts/liquid-glass-container/index.ios.js +0 -121
- package/ui/layouts/liquid-glass-container/index.ios.js.map +0 -1
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.d.ts +0 -4
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.js +0 -5
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.js.map +0 -1
- package/ui/layouts/root-layout/index.android.d.ts +0 -15
- package/ui/layouts/root-layout/index.android.js +0 -126
- package/ui/layouts/root-layout/index.android.js.map +0 -1
- package/ui/layouts/root-layout/index.ios.d.ts +0 -17
- package/ui/layouts/root-layout/index.ios.js +0 -101
- package/ui/layouts/root-layout/index.ios.js.map +0 -1
- package/ui/layouts/root-layout/root-layout-common.d.ts +0 -61
- package/ui/layouts/root-layout/root-layout-common.js +0 -425
- package/ui/layouts/root-layout/root-layout-common.js.map +0 -1
- package/ui/layouts/root-layout/root-layout-stack.d.ts +0 -5
- package/ui/layouts/root-layout/root-layout-stack.js +0 -19
- package/ui/layouts/root-layout/root-layout-stack.js.map +0 -1
- package/ui/layouts/stack-layout/index.android.d.ts +0 -7
- package/ui/layouts/stack-layout/index.android.js +0 -11
- package/ui/layouts/stack-layout/index.android.js.map +0 -1
- package/ui/layouts/stack-layout/index.ios.d.ts +0 -10
- package/ui/layouts/stack-layout/index.ios.js +0 -155
- package/ui/layouts/stack-layout/index.ios.js.map +0 -1
- package/ui/layouts/stack-layout/stack-layout-common.d.ts +0 -8
- package/ui/layouts/stack-layout/stack-layout-common.js +0 -19
- package/ui/layouts/stack-layout/stack-layout-common.js.map +0 -1
- package/ui/layouts/wrap-layout/index.android.d.ts +0 -10
- package/ui/layouts/wrap-layout/index.android.js +0 -18
- package/ui/layouts/wrap-layout/index.android.js.map +0 -1
- package/ui/layouts/wrap-layout/index.ios.d.ts +0 -8
- package/ui/layouts/wrap-layout/index.ios.js +0 -170
- package/ui/layouts/wrap-layout/index.ios.js.map +0 -1
- package/ui/layouts/wrap-layout/wrap-layout-common.d.ts +0 -15
- package/ui/layouts/wrap-layout/wrap-layout-common.js +0 -40
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +0 -1
- package/ui/list-picker/index.android.d.ts +0 -18
- package/ui/list-picker/index.android.js +0 -177
- package/ui/list-picker/index.android.js.map +0 -1
- package/ui/list-picker/index.ios.d.ts +0 -19
- package/ui/list-picker/index.ios.js +0 -99
- package/ui/list-picker/index.ios.js.map +0 -1
- package/ui/list-picker/list-picker-common.d.ts +0 -23
- package/ui/list-picker/list-picker-common.js +0 -78
- package/ui/list-picker/list-picker-common.js.map +0 -1
- package/ui/list-view/index.android.d.ts +0 -68
- package/ui/list-view/index.android.js +0 -1005
- package/ui/list-view/index.android.js.map +0 -1
- package/ui/list-view/index.ios.d.ts +0 -84
- package/ui/list-view/index.ios.js +0 -996
- package/ui/list-view/index.ios.js.map +0 -1
- package/ui/list-view/list-view-common.d.ts +0 -87
- package/ui/list-view/list-view-common.js +0 -296
- package/ui/list-view/list-view-common.js.map +0 -1
- package/ui/page/events.d.ts +0 -6
- package/ui/page/events.js +0 -7
- package/ui/page/events.js.map +0 -1
- package/ui/page/index.android.d.ts +0 -16
- package/ui/page/index.android.js +0 -106
- package/ui/page/index.android.js.map +0 -1
- package/ui/page/index.ios.d.ts +0 -52
- package/ui/page/index.ios.js +0 -515
- package/ui/page/index.ios.js.map +0 -1
- package/ui/page/page-common.d.ts +0 -73
- package/ui/page/page-common.js +0 -191
- package/ui/page/page-common.js.map +0 -1
- package/ui/placeholder/index.android.d.ts +0 -12
- package/ui/placeholder/index.android.js +0 -21
- package/ui/placeholder/index.android.js.map +0 -1
- package/ui/placeholder/index.js +0 -16
- package/ui/placeholder/index.js.map +0 -1
- package/ui/placeholder/placeholder-common.d.ts +0 -11
- package/ui/placeholder/placeholder-common.js +0 -2
- package/ui/placeholder/placeholder-common.js.map +0 -1
- package/ui/progress/index.android.d.ts +0 -18
- package/ui/progress/index.android.js +0 -65
- package/ui/progress/index.android.js.map +0 -1
- package/ui/progress/index.ios.d.ts +0 -19
- package/ui/progress/index.ios.js +0 -45
- package/ui/progress/index.ios.js.map +0 -1
- package/ui/progress/progress-common.d.ts +0 -15
- package/ui/progress/progress-common.js +0 -34
- package/ui/progress/progress-common.js.map +0 -1
- package/ui/proxy-view-container/index.d.ts +0 -33
- package/ui/proxy-view-container/index.js +0 -247
- package/ui/proxy-view-container/index.js.map +0 -1
- package/ui/repeater/index.d.ts +0 -67
- package/ui/repeater/index.js +0 -225
- package/ui/repeater/index.js.map +0 -1
- package/ui/scroll-view/index.android.d.ts +0 -27
- package/ui/scroll-view/index.android.js +0 -157
- package/ui/scroll-view/index.android.js.map +0 -1
- package/ui/scroll-view/index.ios.d.ts +0 -29
- package/ui/scroll-view/index.ios.js +0 -193
- package/ui/scroll-view/index.ios.js.map +0 -1
- package/ui/scroll-view/scroll-view-common.d.ts +0 -27
- package/ui/scroll-view/scroll-view-common.js +0 -93
- package/ui/scroll-view/scroll-view-common.js.map +0 -1
- package/ui/search-bar/index.android.d.ts +0 -44
- package/ui/search-bar/index.android.js +0 -260
- package/ui/search-bar/index.android.js.map +0 -1
- package/ui/search-bar/index.ios.d.ts +0 -36
- package/ui/search-bar/index.ios.js +0 -203
- package/ui/search-bar/index.ios.js.map +0 -1
- package/ui/search-bar/search-bar-common.d.ts +0 -19
- package/ui/search-bar/search-bar-common.js +0 -43
- package/ui/search-bar/search-bar-common.js.map +0 -1
- package/ui/segmented-bar/index.android.d.ts +0 -42
- package/ui/segmented-bar/index.android.js +0 -280
- package/ui/segmented-bar/index.android.js.map +0 -1
- package/ui/segmented-bar/index.ios.d.ts +0 -28
- package/ui/segmented-bar/index.ios.js +0 -140
- package/ui/segmented-bar/index.ios.js.map +0 -1
- package/ui/segmented-bar/segmented-bar-common.d.ts +0 -37
- package/ui/segmented-bar/segmented-bar-common.js +0 -146
- package/ui/segmented-bar/segmented-bar-common.js.map +0 -1
- package/ui/slider/index.android.d.ts +0 -32
- package/ui/slider/index.android.js +0 -123
- package/ui/slider/index.android.js.map +0 -1
- package/ui/slider/index.ios.d.ts +0 -34
- package/ui/slider/index.ios.js +0 -145
- package/ui/slider/index.ios.js.map +0 -1
- package/ui/slider/slider-common.d.ts +0 -27
- package/ui/slider/slider-common.js +0 -69
- package/ui/slider/slider-common.js.map +0 -1
- package/ui/split-view/index.android.d.ts +0 -3
- package/ui/split-view/index.android.js +0 -4
- package/ui/split-view/index.android.js.map +0 -1
- package/ui/split-view/index.ios.d.ts +0 -51
- package/ui/split-view/index.ios.js +0 -567
- package/ui/split-view/index.ios.js.map +0 -1
- package/ui/split-view/split-view-common.d.ts +0 -59
- package/ui/split-view/split-view-common.js +0 -127
- package/ui/split-view/split-view-common.js.map +0 -1
- package/ui/styling/background-common.d.ts +0 -78
- package/ui/styling/background-common.js +0 -241
- package/ui/styling/background-common.js.map +0 -1
- package/ui/styling/background.android.d.ts +0 -3
- package/ui/styling/background.android.js +0 -82
- package/ui/styling/background.android.js.map +0 -1
- package/ui/styling/background.ios.d.ts +0 -21
- package/ui/styling/background.ios.js +0 -1105
- package/ui/styling/background.ios.js.map +0 -1
- package/ui/styling/box-shadow.d.ts +0 -9
- package/ui/styling/box-shadow.js +0 -3
- package/ui/styling/box-shadow.js.map +0 -1
- package/ui/styling/clip-path-function.d.ts +0 -16
- package/ui/styling/clip-path-function.js +0 -25
- package/ui/styling/clip-path-function.js.map +0 -1
- package/ui/styling/converters.d.ts +0 -2
- package/ui/styling/converters.js +0 -41
- package/ui/styling/converters.js.map +0 -1
- package/ui/styling/css-animation-parser.d.ts +0 -14
- package/ui/styling/css-animation-parser.js +0 -187
- package/ui/styling/css-animation-parser.js.map +0 -1
- package/ui/styling/css-selector.d.ts +0 -270
- package/ui/styling/css-selector.js +0 -934
- package/ui/styling/css-selector.js.map +0 -1
- package/ui/styling/css-shadow.d.ts +0 -19
- package/ui/styling/css-shadow.js +0 -26
- package/ui/styling/css-shadow.js.map +0 -1
- package/ui/styling/css-stroke.d.ts +0 -12
- package/ui/styling/css-stroke.js +0 -19
- package/ui/styling/css-stroke.js.map +0 -1
- package/ui/styling/css-transform.d.ts +0 -2
- package/ui/styling/css-transform.js +0 -110
- package/ui/styling/css-transform.js.map +0 -1
- package/ui/styling/css-utils.d.ts +0 -8
- package/ui/styling/css-utils.js +0 -73
- package/ui/styling/css-utils.js.map +0 -1
- package/ui/styling/font-common.d.ts +0 -62
- package/ui/styling/font-common.js +0 -195
- package/ui/styling/font-common.js.map +0 -1
- package/ui/styling/font-interfaces.d.ts +0 -16
- package/ui/styling/font-interfaces.js +0 -2
- package/ui/styling/font-interfaces.js.map +0 -1
- package/ui/styling/font.android.d.ts +0 -15
- package/ui/styling/font.android.js +0 -226
- package/ui/styling/font.android.js.map +0 -1
- package/ui/styling/font.ios.d.ts +0 -18
- package/ui/styling/font.ios.js +0 -159
- package/ui/styling/font.ios.js.map +0 -1
- package/ui/styling/length-shared.d.ts +0 -52
- package/ui/styling/length-shared.js +0 -173
- package/ui/styling/length-shared.js.map +0 -1
- package/ui/styling/linear-gradient.d.ts +0 -13
- package/ui/styling/linear-gradient.js +0 -48
- package/ui/styling/linear-gradient.js.map +0 -1
- package/ui/styling/style/index.d.ts +0 -166
- package/ui/styling/style/index.js +0 -67
- package/ui/styling/style/index.js.map +0 -1
- package/ui/styling/style-properties.d.ts +0 -63
- package/ui/styling/style-properties.js +0 -1151
- package/ui/styling/style-properties.js.map +0 -1
- package/ui/styling/style-scope.d.ts +0 -87
- package/ui/styling/style-scope.js +0 -1020
- package/ui/styling/style-scope.js.map +0 -1
- package/ui/styling/styling-profile.d.ts +0 -1
- package/ui/styling/styling-profile.js +0 -4
- package/ui/styling/styling-profile.js.map +0 -1
- package/ui/styling/styling-shared.d.ts +0 -3
- package/ui/styling/styling-shared.js +0 -6
- package/ui/styling/styling-shared.js.map +0 -1
- package/ui/switch/index.android.d.ts +0 -23
- package/ui/switch/index.android.js +0 -111
- package/ui/switch/index.android.js.map +0 -1
- package/ui/switch/index.ios.d.ts +0 -26
- package/ui/switch/index.ios.js +0 -185
- package/ui/switch/index.ios.js.map +0 -1
- package/ui/switch/switch-common.d.ts +0 -12
- package/ui/switch/switch-common.js +0 -37
- package/ui/switch/switch-common.js.map +0 -1
- package/ui/tab-view/index.android.d.ts +0 -73
- package/ui/tab-view/index.android.js +0 -646
- package/ui/tab-view/index.android.js.map +0 -1
- package/ui/tab-view/index.ios.d.ts +0 -80
- package/ui/tab-view/index.ios.js +0 -877
- package/ui/tab-view/index.ios.js.map +0 -1
- package/ui/tab-view/tab-view-common.d.ts +0 -86
- package/ui/tab-view/tab-view-common.js +0 -277
- package/ui/tab-view/tab-view-common.js.map +0 -1
- package/ui/text-base/formatted-string.js +0 -163
- package/ui/text-base/formatted-string.js.map +0 -1
- package/ui/text-base/index.android.d.ts +0 -79
- package/ui/text-base/index.android.js +0 -589
- package/ui/text-base/index.android.js.map +0 -1
- package/ui/text-base/index.ios.d.ts +0 -53
- package/ui/text-base/index.ios.js +0 -452
- package/ui/text-base/index.ios.js.map +0 -1
- package/ui/text-base/span.js +0 -113
- package/ui/text-base/span.js.map +0 -1
- package/ui/text-base/text-base-common.d.ts +0 -99
- package/ui/text-base/text-base-common.js +0 -324
- package/ui/text-base/text-base-common.js.map +0 -1
- package/ui/text-field/index.android.d.ts +0 -10
- package/ui/text-field/index.android.js +0 -92
- package/ui/text-field/index.android.js.map +0 -1
- package/ui/text-field/index.ios.d.ts +0 -56
- package/ui/text-field/index.ios.js +0 -315
- package/ui/text-field/index.ios.js.map +0 -1
- package/ui/text-field/text-field-common.d.ts +0 -11
- package/ui/text-field/text-field-common.js +0 -25
- package/ui/text-field/text-field-common.js.map +0 -1
- package/ui/text-view/index.android.d.ts +0 -8
- package/ui/text-view/index.android.js +0 -24
- package/ui/text-view/index.android.js.map +0 -1
- package/ui/text-view/index.ios.d.ts +0 -59
- package/ui/text-view/index.ios.js +0 -432
- package/ui/text-view/index.ios.js.map +0 -1
- package/ui/text-view/text-view-common.d.ts +0 -32
- package/ui/text-view/text-view-common.js +0 -39
- package/ui/text-view/text-view-common.js.map +0 -1
- package/ui/time-picker/index.android.d.ts +0 -10
- package/ui/time-picker/index.android.js +0 -79
- package/ui/time-picker/index.android.js.map +0 -1
- package/ui/time-picker/index.ios.d.ts +0 -31
- package/ui/time-picker/index.ios.js +0 -138
- package/ui/time-picker/index.ios.js.map +0 -1
- package/ui/time-picker/time-picker-common.d.ts +0 -31
- package/ui/time-picker/time-picker-common.js +0 -176
- package/ui/time-picker/time-picker-common.js.map +0 -1
- package/ui/transition/fade-transition.android.d.ts +0 -4
- package/ui/transition/fade-transition.android.js +0 -28
- package/ui/transition/fade-transition.android.js.map +0 -1
- package/ui/transition/fade-transition.ios.d.ts +0 -17
- package/ui/transition/fade-transition.ios.js +0 -64
- package/ui/transition/fade-transition.ios.js.map +0 -1
- package/ui/transition/flip-transition.android.d.ts +0 -6
- package/ui/transition/flip-transition.android.js +0 -90
- package/ui/transition/flip-transition.android.js.map +0 -1
- package/ui/transition/index.android.d.ts +0 -19
- package/ui/transition/index.android.js +0 -37
- package/ui/transition/index.android.js.map +0 -1
- package/ui/transition/index.ios.d.ts +0 -14
- package/ui/transition/index.ios.js +0 -30
- package/ui/transition/index.ios.js.map +0 -1
- package/ui/transition/modal-transition.android.d.ts +0 -5
- package/ui/transition/modal-transition.android.js +0 -7
- package/ui/transition/modal-transition.android.js.map +0 -1
- package/ui/transition/modal-transition.ios.d.ts +0 -34
- package/ui/transition/modal-transition.ios.js +0 -175
- package/ui/transition/modal-transition.ios.js.map +0 -1
- package/ui/transition/page-transition.android.d.ts +0 -9
- package/ui/transition/page-transition.android.js +0 -284
- package/ui/transition/page-transition.android.js.map +0 -1
- package/ui/transition/page-transition.ios.d.ts +0 -35
- package/ui/transition/page-transition.ios.js +0 -193
- package/ui/transition/page-transition.ios.js.map +0 -1
- package/ui/transition/shared-transition-helper.android.d.ts +0 -9
- package/ui/transition/shared-transition-helper.android.js +0 -10
- package/ui/transition/shared-transition-helper.android.js.map +0 -1
- package/ui/transition/shared-transition-helper.ios.d.ts +0 -14
- package/ui/transition/shared-transition-helper.ios.js +0 -539
- package/ui/transition/shared-transition-helper.ios.js.map +0 -1
- package/ui/transition/shared-transition.d.ts +0 -271
- package/ui/transition/shared-transition.js +0 -215
- package/ui/transition/shared-transition.js.map +0 -1
- package/ui/transition/slide-transition.android.d.ts +0 -7
- package/ui/transition/slide-transition.android.js +0 -116
- package/ui/transition/slide-transition.android.js.map +0 -1
- package/ui/transition/slide-transition.ios.d.ts +0 -19
- package/ui/transition/slide-transition.ios.js +0 -94
- package/ui/transition/slide-transition.ios.js.map +0 -1
- package/ui/utils.android.d.ts +0 -5
- package/ui/utils.android.js +0 -16
- package/ui/utils.android.js.map +0 -1
- package/ui/utils.ios.d.ts +0 -11
- package/ui/utils.ios.js +0 -66
- package/ui/utils.ios.js.map +0 -1
- package/ui/web-view/index.android.d.ts +0 -18
- package/ui/web-view/index.android.js +0 -173
- package/ui/web-view/index.android.js.map +0 -1
- package/ui/web-view/index.ios.d.ts +0 -27
- package/ui/web-view/index.ios.js +0 -246
- package/ui/web-view/index.ios.js.map +0 -1
- package/ui/web-view/web-view-common.d.ts +0 -30
- package/ui/web-view/web-view-common.js +0 -74
- package/ui/web-view/web-view-common.js.map +0 -1
- package/ui/web-view/web-view-interfaces.d.ts +0 -11
- package/ui/web-view/web-view-interfaces.js +0 -2
- package/ui/web-view/web-view-interfaces.js.map +0 -1
- package/utils/animation-helpers.d.ts +0 -27
- package/utils/animation-helpers.js +0 -48
- package/utils/animation-helpers.js.map +0 -1
- package/utils/common.d.ts +0 -28
- package/utils/common.js +0 -158
- package/utils/common.js.map +0 -1
- package/utils/constants.android.d.ts +0 -2
- package/utils/constants.android.js +0 -5
- package/utils/constants.android.js.map +0 -1
- package/utils/constants.ios.d.ts +0 -2
- package/utils/constants.ios.js +0 -5
- package/utils/constants.ios.js.map +0 -1
- package/utils/debug-source.d.ts +0 -19
- package/utils/debug-source.js +0 -78
- package/utils/debug-source.js.map +0 -1
- package/utils/debug.js +0 -3
- package/utils/debug.js.map +0 -1
- package/utils/index.android.d.ts +0 -26
- package/utils/index.android.js +0 -205
- package/utils/index.android.js.map +0 -1
- package/utils/index.ios.d.ts +0 -22
- package/utils/index.ios.js +0 -113
- package/utils/index.ios.js.map +0 -1
- package/utils/layout-helper/index.android.d.ts +0 -25
- package/utils/layout-helper/index.android.js +0 -86
- package/utils/layout-helper/index.android.js.map +0 -1
- package/utils/layout-helper/index.ios.d.ts +0 -25
- package/utils/layout-helper/index.ios.js +0 -68
- package/utils/layout-helper/index.ios.js.map +0 -1
- package/utils/layout-helper/layout-helper-common.d.ts +0 -5
- package/utils/layout-helper/layout-helper-common.js +0 -49
- package/utils/layout-helper/layout-helper-common.js.map +0 -1
- package/utils/layout-helper/layout-helper-shared.d.ts +0 -9
- package/utils/layout-helper/layout-helper-shared.js +0 -13
- package/utils/layout-helper/layout-helper-shared.js.map +0 -1
- package/utils/lazy.js +0 -5
- package/utils/lazy.js.map +0 -1
- package/utils/macrotask-scheduler.js +0 -26
- package/utils/macrotask-scheduler.js.map +0 -1
- package/utils/mainthread-helper.android.d.ts +0 -3
- package/utils/mainthread-helper.android.js +0 -28
- package/utils/mainthread-helper.android.js.map +0 -1
- package/utils/mainthread-helper.ios.d.ts +0 -3
- package/utils/mainthread-helper.ios.js +0 -17
- package/utils/mainthread-helper.ios.js.map +0 -1
- package/utils/module-merge.d.ts +0 -1
- package/utils/module-merge.js +0 -8
- package/utils/module-merge.js.map +0 -1
- package/utils/native-helper-for-android.d.ts +0 -45
- package/utils/native-helper-for-android.js +0 -376
- package/utils/native-helper-for-android.js.map +0 -1
- package/utils/native-helper.android.d.ts +0 -42
- package/utils/native-helper.android.js +0 -30
- package/utils/native-helper.android.js.map +0 -1
- package/utils/native-helper.ios.d.ts +0 -79
- package/utils/native-helper.ios.js +0 -339
- package/utils/native-helper.ios.js.map +0 -1
- package/utils/number-utils.d.ts +0 -19
- package/utils/number-utils.js +0 -37
- package/utils/number-utils.js.map +0 -1
- package/utils/platform-check.d.ts +0 -4
- package/utils/platform-check.js +0 -21
- package/utils/platform-check.js.map +0 -1
- package/utils/shared.d.ts +0 -17
- package/utils/shared.js +0 -40
- package/utils/shared.js.map +0 -1
- package/utils/types.js +0 -104
- package/utils/types.js.map +0 -1
- package/utils/utils-shared.d.ts +0 -1
- package/utils/utils-shared.js +0 -8
- package/utils/utils-shared.js.map +0 -1
- package/wgc/atob.d.ts +0 -1
- package/wgc/atob.js +0 -9
- package/wgc/atob.js.map +0 -1
- package/wgc/btoa.d.ts +0 -1
- package/wgc/btoa.js +0 -9
- package/wgc/btoa.js.map +0 -1
- package/wgc/crypto/SubtleCrypto.d.ts +0 -63
- package/wgc/crypto/SubtleCrypto.js +0 -551
- package/wgc/crypto/SubtleCrypto.js.map +0 -1
- package/wgc/crypto/index.d.ts +0 -8
- package/wgc/crypto/index.js +0 -32
- package/wgc/crypto/index.js.map +0 -1
- package/wgc/index.d.ts +0 -2
- package/wgc/index.js +0 -3
- package/wgc/index.js.map +0 -1
- package/xhr/index.d.ts +0 -113
- package/xhr/index.js +0 -486
- package/xhr/index.js.map +0 -1
- package/xml/index.d.ts +0 -108
- package/xml/index.js +0 -574
- package/xml/index.js.map +0 -1
|
@@ -1,1105 +0,0 @@
|
|
|
1
|
-
import { LinearGradient } from './linear-gradient';
|
|
2
|
-
import { Screen } from '../../platform';
|
|
3
|
-
import { isDataURI, isFileOrResourcePath, layout } from '../../utils';
|
|
4
|
-
import { ios as iosViewUtils } from '../utils';
|
|
5
|
-
import { ImageSource } from '../../image-source';
|
|
6
|
-
import { parse as cssParse } from '../../css-value/reworkcss-value';
|
|
7
|
-
import { ClipPathFunction } from './clip-path-function';
|
|
8
|
-
export * from './background-common';
|
|
9
|
-
const clearCGColor = UIColor.clearColor.CGColor;
|
|
10
|
-
const uriPattern = /url\(('|")(.*?)\1\)/;
|
|
11
|
-
const symbolUrl = Symbol('backgroundImageUrl');
|
|
12
|
-
export var CacheMode;
|
|
13
|
-
(function (CacheMode) {
|
|
14
|
-
CacheMode[CacheMode["none"] = 0] = "none";
|
|
15
|
-
})(CacheMode || (CacheMode = {}));
|
|
16
|
-
export var ios;
|
|
17
|
-
(function (ios) {
|
|
18
|
-
function createBackgroundUIColor(view, callback, flip) {
|
|
19
|
-
const background = view.style.backgroundInternal;
|
|
20
|
-
const nativeView = view.nativeViewProtected;
|
|
21
|
-
if (!nativeView) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
// Unset this in case another layer handles background color (e.g. gradient)
|
|
25
|
-
nativeView.layer.backgroundColor = null;
|
|
26
|
-
// Cleanup of previous values
|
|
27
|
-
clearBackgroundVisualEffects(view);
|
|
28
|
-
// Borders, shadows, etc
|
|
29
|
-
drawBackgroundVisualEffects(view);
|
|
30
|
-
if (!background.image) {
|
|
31
|
-
callback(background?.color?.ios);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
if (!(background.image instanceof LinearGradient)) {
|
|
35
|
-
createUIImageFromURI(view, background.image, flip, (image) => {
|
|
36
|
-
callback(image ? UIColor.alloc().initWithPatternImage(image) : background?.color?.ios);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
ios.createBackgroundUIColor = createBackgroundUIColor;
|
|
42
|
-
function drawBackgroundVisualEffects(view) {
|
|
43
|
-
const background = view.style.backgroundInternal;
|
|
44
|
-
const nativeView = view.nativeViewProtected;
|
|
45
|
-
const layer = nativeView.layer;
|
|
46
|
-
let needsLayerAdjustmentOnScroll = false;
|
|
47
|
-
// Add new gradient layer or update existing one
|
|
48
|
-
if (background.image instanceof LinearGradient) {
|
|
49
|
-
if (!nativeView.gradientLayer) {
|
|
50
|
-
nativeView.gradientLayer = CAGradientLayer.new();
|
|
51
|
-
layer.insertSublayerAtIndex(nativeView.gradientLayer, 0);
|
|
52
|
-
}
|
|
53
|
-
iosViewUtils.drawGradient(nativeView, nativeView.gradientLayer, background.image);
|
|
54
|
-
needsLayerAdjustmentOnScroll = true;
|
|
55
|
-
}
|
|
56
|
-
// Initialize clipping mask (usually for clip-path and non-uniform rounded borders)
|
|
57
|
-
maskLayerIfNeeded(nativeView, background);
|
|
58
|
-
if (background.hasUniformBorder()) {
|
|
59
|
-
const borderColor = background.getUniformBorderColor();
|
|
60
|
-
layer.borderColor = borderColor?.ios?.CGColor;
|
|
61
|
-
layer.borderWidth = layout.toDeviceIndependentPixels(background.getUniformBorderWidth());
|
|
62
|
-
layer.cornerRadius = getUniformBorderRadius(view, layer.bounds);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
drawNonUniformBorders(nativeView, background);
|
|
66
|
-
needsLayerAdjustmentOnScroll = true;
|
|
67
|
-
}
|
|
68
|
-
// Clip-path should be called after borders are applied
|
|
69
|
-
if (nativeView.maskType === iosViewUtils.LayerMask.CLIP_PATH && layer.mask instanceof CAShapeLayer) {
|
|
70
|
-
layer.mask.path = generateClipPath(view, layer.bounds);
|
|
71
|
-
}
|
|
72
|
-
if (background.hasBoxShadows()) {
|
|
73
|
-
drawBoxShadow(view);
|
|
74
|
-
needsLayerAdjustmentOnScroll = true;
|
|
75
|
-
}
|
|
76
|
-
if (needsLayerAdjustmentOnScroll) {
|
|
77
|
-
registerAdjustLayersOnScrollListener(view);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
ios.drawBackgroundVisualEffects = drawBackgroundVisualEffects;
|
|
81
|
-
function clearBackgroundVisualEffects(view) {
|
|
82
|
-
const nativeView = view.nativeViewProtected;
|
|
83
|
-
if (!nativeView) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
const background = view.style.backgroundInternal;
|
|
87
|
-
const hasGradientBackground = background.image && background.image instanceof LinearGradient;
|
|
88
|
-
// Remove mask if there is no clip path or non-uniform border with radius
|
|
89
|
-
let needsMask;
|
|
90
|
-
switch (nativeView.maskType) {
|
|
91
|
-
case iosViewUtils.LayerMask.BORDER:
|
|
92
|
-
needsMask = !background.hasUniformBorder() && background.hasBorderRadius();
|
|
93
|
-
break;
|
|
94
|
-
case iosViewUtils.LayerMask.CLIP_PATH:
|
|
95
|
-
needsMask = !!background.clipPath;
|
|
96
|
-
break;
|
|
97
|
-
default:
|
|
98
|
-
needsMask = false;
|
|
99
|
-
break;
|
|
100
|
-
}
|
|
101
|
-
if (!needsMask) {
|
|
102
|
-
clearLayerMask(nativeView);
|
|
103
|
-
}
|
|
104
|
-
// Clear box shadow if it's no longer needed
|
|
105
|
-
if (background.clearFlags & 2 /* BackgroundClearFlags.CLEAR_BOX_SHADOW */) {
|
|
106
|
-
clearBoxShadow(nativeView);
|
|
107
|
-
}
|
|
108
|
-
// Non-uniform borders cleanup
|
|
109
|
-
if (nativeView.hasNonUniformBorder) {
|
|
110
|
-
if (nativeView.hasNonUniformBorderColor && background.hasUniformBorderColor()) {
|
|
111
|
-
clearNonUniformColorBorders(nativeView);
|
|
112
|
-
}
|
|
113
|
-
if (background.hasUniformBorder()) {
|
|
114
|
-
clearNonUniformBorders(nativeView);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
if (nativeView.gradientLayer && !hasGradientBackground) {
|
|
118
|
-
nativeView.gradientLayer.removeFromSuperlayer();
|
|
119
|
-
nativeView.gradientLayer = null;
|
|
120
|
-
}
|
|
121
|
-
// Force unset scroll listener
|
|
122
|
-
unregisterAdjustLayersOnScrollListener(view);
|
|
123
|
-
// Reset clear flags
|
|
124
|
-
background.clearFlags = 0 /* BackgroundClearFlags.NONE */;
|
|
125
|
-
}
|
|
126
|
-
ios.clearBackgroundVisualEffects = clearBackgroundVisualEffects;
|
|
127
|
-
function createUIImageFromURI(view, imageURI, flip, callback) {
|
|
128
|
-
const nativeView = view.nativeViewProtected;
|
|
129
|
-
if (!nativeView) {
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
const frame = nativeView.frame;
|
|
133
|
-
const boundsWidth = view.scaleX ? frame.size.width / view.scaleX : frame.size.width;
|
|
134
|
-
const boundsHeight = view.scaleY ? frame.size.height / view.scaleY : frame.size.height;
|
|
135
|
-
if (!boundsWidth || !boundsHeight) {
|
|
136
|
-
return undefined;
|
|
137
|
-
}
|
|
138
|
-
const style = view.style;
|
|
139
|
-
if (imageURI) {
|
|
140
|
-
const match = imageURI.match(uriPattern);
|
|
141
|
-
if (match && match[2]) {
|
|
142
|
-
imageURI = match[2];
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
let bitmap;
|
|
146
|
-
if (isDataURI(imageURI)) {
|
|
147
|
-
const base64Data = imageURI.split(',')[1];
|
|
148
|
-
if (base64Data !== undefined) {
|
|
149
|
-
const imageSource = ImageSource.fromBase64Sync(base64Data);
|
|
150
|
-
bitmap = imageSource && imageSource.ios;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
else if (isFileOrResourcePath(imageURI)) {
|
|
154
|
-
const imageSource = ImageSource.fromFileOrResourceSync(imageURI);
|
|
155
|
-
bitmap = imageSource && imageSource.ios;
|
|
156
|
-
}
|
|
157
|
-
else if (imageURI.indexOf('http') !== -1) {
|
|
158
|
-
style[symbolUrl] = imageURI;
|
|
159
|
-
ImageSource.fromUrl(imageURI)
|
|
160
|
-
.then((r) => {
|
|
161
|
-
if (style && style[symbolUrl] === imageURI) {
|
|
162
|
-
callback(generatePatternImage(r.ios, view, flip));
|
|
163
|
-
}
|
|
164
|
-
})
|
|
165
|
-
.catch(() => { });
|
|
166
|
-
}
|
|
167
|
-
callback(generatePatternImage(bitmap, view, flip));
|
|
168
|
-
}
|
|
169
|
-
ios.createUIImageFromURI = createUIImageFromURI;
|
|
170
|
-
function generateShadowLayerPaths(view, boxShadow, bounds) {
|
|
171
|
-
const background = view.style.backgroundInternal;
|
|
172
|
-
const nativeView = view.nativeViewProtected;
|
|
173
|
-
const layer = nativeView.layer;
|
|
174
|
-
const spreadRadius = layout.toDeviceIndependentPixels(boxShadow.spreadRadius);
|
|
175
|
-
const { width, height } = bounds.size;
|
|
176
|
-
let innerPath, shadowPath;
|
|
177
|
-
// Generate more detailed paths if view has border radius
|
|
178
|
-
if (background.hasBorderRadius()) {
|
|
179
|
-
if (background.hasUniformBorder()) {
|
|
180
|
-
const cornerRadius = layer.cornerRadius;
|
|
181
|
-
const cappedRadius = getBorderCapRadius(cornerRadius, width / 2, height / 2);
|
|
182
|
-
const cappedOuterRadii = {
|
|
183
|
-
topLeft: cappedRadius,
|
|
184
|
-
topRight: cappedRadius,
|
|
185
|
-
bottomLeft: cappedRadius,
|
|
186
|
-
bottomRight: cappedRadius,
|
|
187
|
-
};
|
|
188
|
-
const cappedOuterRadiiWithSpread = {
|
|
189
|
-
topLeft: cappedRadius + spreadRadius,
|
|
190
|
-
topRight: cappedRadius + spreadRadius,
|
|
191
|
-
bottomLeft: cappedRadius + spreadRadius,
|
|
192
|
-
bottomRight: cappedRadius + spreadRadius,
|
|
193
|
-
};
|
|
194
|
-
innerPath = generateNonUniformBorderOuterClipPath(bounds, cappedOuterRadii);
|
|
195
|
-
shadowPath = generateNonUniformBorderOuterClipPath(bounds, cappedOuterRadiiWithSpread, spreadRadius);
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
const outerTopLeftRadius = layout.toDeviceIndependentPixels(background.borderTopLeftRadius);
|
|
199
|
-
const outerTopRightRadius = layout.toDeviceIndependentPixels(background.borderTopRightRadius);
|
|
200
|
-
const outerBottomRightRadius = layout.toDeviceIndependentPixels(background.borderBottomRightRadius);
|
|
201
|
-
const outerBottomLeftRadius = layout.toDeviceIndependentPixels(background.borderBottomLeftRadius);
|
|
202
|
-
const topRadii = outerTopLeftRadius + outerTopRightRadius;
|
|
203
|
-
const rightRadii = outerTopRightRadius + outerBottomRightRadius;
|
|
204
|
-
const bottomRadii = outerBottomRightRadius + outerBottomLeftRadius;
|
|
205
|
-
const leftRadii = outerBottomLeftRadius + outerTopLeftRadius;
|
|
206
|
-
const cappedOuterRadii = {
|
|
207
|
-
topLeft: getBorderCapRadius(outerTopLeftRadius, (outerTopLeftRadius / topRadii) * width, (outerTopLeftRadius / leftRadii) * height),
|
|
208
|
-
topRight: getBorderCapRadius(outerTopRightRadius, (outerTopRightRadius / topRadii) * width, (outerTopRightRadius / rightRadii) * height),
|
|
209
|
-
bottomLeft: getBorderCapRadius(outerBottomLeftRadius, (outerBottomLeftRadius / bottomRadii) * width, (outerBottomLeftRadius / leftRadii) * height),
|
|
210
|
-
bottomRight: getBorderCapRadius(outerBottomRightRadius, (outerBottomRightRadius / bottomRadii) * width, (outerBottomRightRadius / rightRadii) * height),
|
|
211
|
-
};
|
|
212
|
-
// Add spread radius to corners that actually have radius as shadow has grown larger
|
|
213
|
-
// than view itself and needs to be rounded accordingly
|
|
214
|
-
const cappedOuterRadiiWithSpread = {
|
|
215
|
-
topLeft: cappedOuterRadii.topLeft > 0 ? cappedOuterRadii.topLeft + spreadRadius : cappedOuterRadii.topLeft,
|
|
216
|
-
topRight: cappedOuterRadii.topRight > 0 ? cappedOuterRadii.topRight + spreadRadius : cappedOuterRadii.topRight,
|
|
217
|
-
bottomLeft: cappedOuterRadii.bottomLeft > 0 ? cappedOuterRadii.bottomLeft + spreadRadius : cappedOuterRadii.bottomLeft,
|
|
218
|
-
bottomRight: cappedOuterRadii.bottomRight > 0 ? cappedOuterRadii.bottomRight + spreadRadius : cappedOuterRadii.bottomRight,
|
|
219
|
-
};
|
|
220
|
-
innerPath = generateNonUniformBorderOuterClipPath(bounds, cappedOuterRadii);
|
|
221
|
-
shadowPath = generateNonUniformBorderOuterClipPath(bounds, cappedOuterRadiiWithSpread, spreadRadius);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
else {
|
|
225
|
-
innerPath = CGPathCreateWithRect(bounds, null);
|
|
226
|
-
shadowPath = CGPathCreateWithRect(CGRectInset(bounds, -spreadRadius, -spreadRadius), null);
|
|
227
|
-
}
|
|
228
|
-
return {
|
|
229
|
-
maskPath: generateShadowMaskPath(bounds, boxShadow, innerPath),
|
|
230
|
-
shadowPath,
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
ios.generateShadowLayerPaths = generateShadowLayerPaths;
|
|
234
|
-
function generateClipPath(view, bounds) {
|
|
235
|
-
const background = view.style.backgroundInternal;
|
|
236
|
-
const { origin, size } = bounds;
|
|
237
|
-
const position = {
|
|
238
|
-
left: origin.x,
|
|
239
|
-
top: origin.y,
|
|
240
|
-
bottom: size.height,
|
|
241
|
-
right: size.width,
|
|
242
|
-
};
|
|
243
|
-
if (position.right === 0 || position.bottom === 0) {
|
|
244
|
-
return;
|
|
245
|
-
}
|
|
246
|
-
let path;
|
|
247
|
-
const clipPath = background.clipPath;
|
|
248
|
-
if (clipPath instanceof ClipPathFunction) {
|
|
249
|
-
switch (clipPath.shape) {
|
|
250
|
-
case 'rect':
|
|
251
|
-
path = rectPath(clipPath.rule, position);
|
|
252
|
-
break;
|
|
253
|
-
case 'inset':
|
|
254
|
-
path = insetPath(clipPath.rule, position);
|
|
255
|
-
break;
|
|
256
|
-
case 'circle':
|
|
257
|
-
path = circlePath(clipPath.rule, position);
|
|
258
|
-
break;
|
|
259
|
-
case 'ellipse':
|
|
260
|
-
path = ellipsePath(clipPath.rule, position);
|
|
261
|
-
break;
|
|
262
|
-
case 'polygon':
|
|
263
|
-
path = polygonPath(clipPath.rule, position);
|
|
264
|
-
break;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
else {
|
|
268
|
-
path = null;
|
|
269
|
-
}
|
|
270
|
-
return path;
|
|
271
|
-
}
|
|
272
|
-
ios.generateClipPath = generateClipPath;
|
|
273
|
-
function getUniformBorderRadius(view, bounds) {
|
|
274
|
-
const background = view.style.backgroundInternal;
|
|
275
|
-
const { width, height } = bounds.size;
|
|
276
|
-
const cornerRadius = layout.toDeviceIndependentPixels(background.getUniformBorderRadius());
|
|
277
|
-
return Math.min(Math.min(width / 2, height / 2), cornerRadius);
|
|
278
|
-
}
|
|
279
|
-
ios.getUniformBorderRadius = getUniformBorderRadius;
|
|
280
|
-
function generateNonUniformBorderInnerClipRoundedPath(view, bounds) {
|
|
281
|
-
const background = view.style.backgroundInternal;
|
|
282
|
-
const cappedOuterRadii = calculateNonUniformBorderCappedRadii(bounds, background);
|
|
283
|
-
return generateNonUniformBorderInnerClipPath(bounds, background, cappedOuterRadii);
|
|
284
|
-
}
|
|
285
|
-
ios.generateNonUniformBorderInnerClipRoundedPath = generateNonUniformBorderInnerClipRoundedPath;
|
|
286
|
-
function generateNonUniformBorderOuterClipRoundedPath(view, bounds) {
|
|
287
|
-
const background = view.style.backgroundInternal;
|
|
288
|
-
const cappedOuterRadii = calculateNonUniformBorderCappedRadii(bounds, background);
|
|
289
|
-
return generateNonUniformBorderOuterClipPath(bounds, cappedOuterRadii);
|
|
290
|
-
}
|
|
291
|
-
ios.generateNonUniformBorderOuterClipRoundedPath = generateNonUniformBorderOuterClipRoundedPath;
|
|
292
|
-
function generateNonUniformMultiColorBorderRoundedPaths(view, bounds) {
|
|
293
|
-
const background = view.style.backgroundInternal;
|
|
294
|
-
return generateNonUniformMultiColorBorderPaths(bounds, background);
|
|
295
|
-
}
|
|
296
|
-
ios.generateNonUniformMultiColorBorderRoundedPaths = generateNonUniformMultiColorBorderRoundedPaths;
|
|
297
|
-
})(ios || (ios = {}));
|
|
298
|
-
function maskLayerIfNeeded(nativeView, background) {
|
|
299
|
-
const layer = nativeView.layer;
|
|
300
|
-
// Check if layer should be masked
|
|
301
|
-
if (!(layer.mask instanceof CAShapeLayer)) {
|
|
302
|
-
// Since layers can only accept up to a single mask at a time, clip path is given more priority
|
|
303
|
-
if (background.clipPath) {
|
|
304
|
-
nativeView.maskType = iosViewUtils.LayerMask.CLIP_PATH;
|
|
305
|
-
}
|
|
306
|
-
else if (!background.hasUniformBorder() && background.hasBorderRadius()) {
|
|
307
|
-
nativeView.maskType = iosViewUtils.LayerMask.BORDER;
|
|
308
|
-
}
|
|
309
|
-
else {
|
|
310
|
-
nativeView.maskType = null;
|
|
311
|
-
}
|
|
312
|
-
if (nativeView.maskType != null) {
|
|
313
|
-
nativeView.originalMask = layer.mask;
|
|
314
|
-
layer.mask = CAShapeLayer.new();
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
function clearLayerMask(nativeView) {
|
|
319
|
-
if (nativeView.outerShadowContainerLayer) {
|
|
320
|
-
nativeView.outerShadowContainerLayer.mask = null;
|
|
321
|
-
}
|
|
322
|
-
nativeView.layer.mask = nativeView.originalMask;
|
|
323
|
-
nativeView.originalMask = null;
|
|
324
|
-
nativeView.maskType = null;
|
|
325
|
-
}
|
|
326
|
-
function onBackgroundViewScroll(args) {
|
|
327
|
-
const view = args.object;
|
|
328
|
-
const nativeView = view.nativeViewProtected;
|
|
329
|
-
if (nativeView instanceof UIScrollView) {
|
|
330
|
-
adjustLayersForScrollView(nativeView);
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
function adjustLayersForScrollView(nativeView) {
|
|
334
|
-
// Compensates with transition for the background layers for scrolling in ScrollView based controls.
|
|
335
|
-
CATransaction.begin();
|
|
336
|
-
CATransaction.setDisableActions(true);
|
|
337
|
-
const offset = nativeView.contentOffset;
|
|
338
|
-
const transform = {
|
|
339
|
-
a: 1,
|
|
340
|
-
b: 0,
|
|
341
|
-
c: 0,
|
|
342
|
-
d: 1,
|
|
343
|
-
tx: offset.x,
|
|
344
|
-
ty: offset.y,
|
|
345
|
-
};
|
|
346
|
-
if (nativeView.layer.mask) {
|
|
347
|
-
nativeView.layer.mask.setAffineTransform(transform);
|
|
348
|
-
}
|
|
349
|
-
// Nested layers
|
|
350
|
-
if (nativeView.gradientLayer) {
|
|
351
|
-
nativeView.gradientLayer.setAffineTransform(transform);
|
|
352
|
-
}
|
|
353
|
-
if (nativeView.borderLayer) {
|
|
354
|
-
nativeView.borderLayer.setAffineTransform(transform);
|
|
355
|
-
}
|
|
356
|
-
if (nativeView.outerShadowContainerLayer) {
|
|
357
|
-
// Update bounds of shadow layer as it belongs to parent view
|
|
358
|
-
nativeView.outerShadowContainerLayer.bounds = nativeView.bounds;
|
|
359
|
-
nativeView.outerShadowContainerLayer.setAffineTransform(transform);
|
|
360
|
-
}
|
|
361
|
-
CATransaction.setDisableActions(false);
|
|
362
|
-
CATransaction.commit();
|
|
363
|
-
}
|
|
364
|
-
function unregisterAdjustLayersOnScrollListener(view) {
|
|
365
|
-
if (view.nativeViewProtected instanceof UIScrollView) {
|
|
366
|
-
view.off('scroll', onBackgroundViewScroll);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
function registerAdjustLayersOnScrollListener(view) {
|
|
370
|
-
if (view.nativeViewProtected instanceof UIScrollView) {
|
|
371
|
-
view.off('scroll', onBackgroundViewScroll);
|
|
372
|
-
view.on('scroll', onBackgroundViewScroll);
|
|
373
|
-
adjustLayersForScrollView(view.nativeViewProtected);
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
function clearNonUniformColorBorders(nativeView) {
|
|
377
|
-
if (nativeView.borderLayer) {
|
|
378
|
-
nativeView.borderLayer.mask = null;
|
|
379
|
-
nativeView.borderLayer.sublayers = null;
|
|
380
|
-
}
|
|
381
|
-
nativeView.hasNonUniformBorderColor = false;
|
|
382
|
-
}
|
|
383
|
-
function clearNonUniformBorders(nativeView) {
|
|
384
|
-
if (nativeView.borderLayer) {
|
|
385
|
-
nativeView.borderLayer.removeFromSuperlayer();
|
|
386
|
-
nativeView.borderLayer = null;
|
|
387
|
-
}
|
|
388
|
-
nativeView.hasNonUniformBorder = false;
|
|
389
|
-
}
|
|
390
|
-
function parsePosition(pos) {
|
|
391
|
-
const values = cssParse(pos);
|
|
392
|
-
if (values.length === 2) {
|
|
393
|
-
// @ts-ignore
|
|
394
|
-
return { x: values[0], y: values[1] };
|
|
395
|
-
}
|
|
396
|
-
if (values.length === 1) {
|
|
397
|
-
const center = { type: 'ident', string: 'center' };
|
|
398
|
-
if (values[0].type === 'ident') {
|
|
399
|
-
const val = values[0].string.toLocaleLowerCase();
|
|
400
|
-
// If you only one keyword is specified, the other value is "center"
|
|
401
|
-
if (val === 'left' || val === 'right') {
|
|
402
|
-
return { x: values[0], y: center };
|
|
403
|
-
}
|
|
404
|
-
else if (val === 'top' || val === 'bottom') {
|
|
405
|
-
return { x: center, y: values[0] };
|
|
406
|
-
}
|
|
407
|
-
else if (val === 'center') {
|
|
408
|
-
return { x: center, y: center };
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
else if (values[0].type === 'number') {
|
|
412
|
-
return { x: values[0], y: center };
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
return null;
|
|
416
|
-
}
|
|
417
|
-
function getDrawParams(image, background, width, height) {
|
|
418
|
-
if (!image) {
|
|
419
|
-
return null;
|
|
420
|
-
}
|
|
421
|
-
const res = {
|
|
422
|
-
repeatX: true,
|
|
423
|
-
repeatY: true,
|
|
424
|
-
posX: 0,
|
|
425
|
-
posY: 0,
|
|
426
|
-
};
|
|
427
|
-
// repeat
|
|
428
|
-
if (background.repeat) {
|
|
429
|
-
switch (background.repeat.toLowerCase()) {
|
|
430
|
-
case 'no-repeat':
|
|
431
|
-
res.repeatX = false;
|
|
432
|
-
res.repeatY = false;
|
|
433
|
-
break;
|
|
434
|
-
case 'repeat-x':
|
|
435
|
-
res.repeatY = false;
|
|
436
|
-
break;
|
|
437
|
-
case 'repeat-y':
|
|
438
|
-
res.repeatX = false;
|
|
439
|
-
break;
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
const imageSize = image.size;
|
|
443
|
-
let imageWidth = imageSize.width;
|
|
444
|
-
let imageHeight = imageSize.height;
|
|
445
|
-
// size
|
|
446
|
-
const size = background.size;
|
|
447
|
-
if (size) {
|
|
448
|
-
const values = cssParse(size);
|
|
449
|
-
if (values.length === 2) {
|
|
450
|
-
const vx = values[0];
|
|
451
|
-
const vy = values[1];
|
|
452
|
-
if (vx.unit === '%' && vy.unit === '%') {
|
|
453
|
-
imageWidth = (width * vx.value) / 100;
|
|
454
|
-
imageHeight = (height * vy.value) / 100;
|
|
455
|
-
res.sizeX = imageWidth;
|
|
456
|
-
res.sizeY = imageHeight;
|
|
457
|
-
}
|
|
458
|
-
else if (vx.type === 'number' && vy.type === 'number' && ((vx.unit === 'px' && vy.unit === 'px') || (vx.unit === '' && vy.unit === ''))) {
|
|
459
|
-
imageWidth = vx.value;
|
|
460
|
-
imageHeight = vy.value;
|
|
461
|
-
res.sizeX = imageWidth;
|
|
462
|
-
res.sizeY = imageHeight;
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
else if (values.length === 1 && values[0].type === 'ident') {
|
|
466
|
-
let scale = 0;
|
|
467
|
-
if (values[0].string === 'cover') {
|
|
468
|
-
scale = Math.max(width / imageWidth, height / imageHeight);
|
|
469
|
-
}
|
|
470
|
-
else if (values[0].string === 'contain') {
|
|
471
|
-
scale = Math.min(width / imageWidth, height / imageHeight);
|
|
472
|
-
}
|
|
473
|
-
if (scale > 0) {
|
|
474
|
-
imageWidth *= scale;
|
|
475
|
-
imageHeight *= scale;
|
|
476
|
-
res.sizeX = imageWidth;
|
|
477
|
-
res.sizeY = imageHeight;
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
// position
|
|
482
|
-
const position = background.position;
|
|
483
|
-
if (position) {
|
|
484
|
-
const v = parsePosition(position);
|
|
485
|
-
if (v) {
|
|
486
|
-
const spaceX = width - imageWidth;
|
|
487
|
-
const spaceY = height - imageHeight;
|
|
488
|
-
if (v.x.unit === '%' && v.y.unit === '%') {
|
|
489
|
-
res.posX = (spaceX * v.x.value) / 100;
|
|
490
|
-
res.posY = (spaceY * v.y.value) / 100;
|
|
491
|
-
}
|
|
492
|
-
else if (v.x.type === 'number' && v.y.type === 'number' && ((v.x.unit === 'px' && v.y.unit === 'px') || (v.x.unit === '' && v.y.unit === ''))) {
|
|
493
|
-
res.posX = v.x.value;
|
|
494
|
-
res.posY = v.y.value;
|
|
495
|
-
}
|
|
496
|
-
else if (v.x.type === 'ident' && v.y.type === 'ident') {
|
|
497
|
-
if (v.x.string.toLowerCase() === 'center') {
|
|
498
|
-
res.posX = spaceX / 2;
|
|
499
|
-
}
|
|
500
|
-
else if (v.x.string.toLowerCase() === 'right') {
|
|
501
|
-
res.posX = spaceX;
|
|
502
|
-
}
|
|
503
|
-
if (v.y.string.toLowerCase() === 'center') {
|
|
504
|
-
res.posY = spaceY / 2;
|
|
505
|
-
}
|
|
506
|
-
else if (v.y.string.toLowerCase() === 'bottom') {
|
|
507
|
-
res.posY = spaceY;
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
else if (v.x.type === 'number' && v.y.type === 'ident') {
|
|
511
|
-
if (v.x.unit === '%') {
|
|
512
|
-
res.posX = (spaceX * v.x.value) / 100;
|
|
513
|
-
}
|
|
514
|
-
else if (v.x.unit === 'px' || v.x.unit === '') {
|
|
515
|
-
res.posX = v.x.value;
|
|
516
|
-
}
|
|
517
|
-
if (v.y.string.toLowerCase() === 'center') {
|
|
518
|
-
res.posY = spaceY / 2;
|
|
519
|
-
}
|
|
520
|
-
else if (v.y.string.toLowerCase() === 'bottom') {
|
|
521
|
-
res.posY = spaceY;
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
return res;
|
|
527
|
-
}
|
|
528
|
-
function generatePatternImage(img, view, flip) {
|
|
529
|
-
const background = view.style.backgroundInternal;
|
|
530
|
-
const nativeView = view.nativeViewProtected;
|
|
531
|
-
if (!img || !nativeView) {
|
|
532
|
-
return null;
|
|
533
|
-
}
|
|
534
|
-
const frame = nativeView.frame;
|
|
535
|
-
const boundsWidth = view.scaleX ? frame.size.width / view.scaleX : frame.size.width;
|
|
536
|
-
const boundsHeight = view.scaleY ? frame.size.height / view.scaleY : frame.size.height;
|
|
537
|
-
const params = getDrawParams(img, background, boundsWidth, boundsHeight);
|
|
538
|
-
if (params.sizeX > 0 && params.sizeY > 0) {
|
|
539
|
-
const resizeRect = CGRectMake(0, 0, params.sizeX, params.sizeY);
|
|
540
|
-
UIGraphicsBeginImageContextWithOptions(resizeRect.size, false, 0.0);
|
|
541
|
-
img.drawInRect(resizeRect);
|
|
542
|
-
img = UIGraphicsGetImageFromCurrentImageContext();
|
|
543
|
-
UIGraphicsEndImageContext();
|
|
544
|
-
}
|
|
545
|
-
UIGraphicsBeginImageContextWithOptions(CGSizeFromString(`{${boundsWidth},${boundsHeight}}`), false, 0.0);
|
|
546
|
-
const context = UIGraphicsGetCurrentContext();
|
|
547
|
-
if (background.color && background.color.ios) {
|
|
548
|
-
CGContextSetFillColorWithColor(context, background.color.ios.CGColor);
|
|
549
|
-
CGContextFillRect(context, CGRectMake(0, 0, boundsWidth, boundsHeight));
|
|
550
|
-
}
|
|
551
|
-
if (!params.repeatX && !params.repeatY) {
|
|
552
|
-
img.drawAtPoint(CGPointMake(params.posX, params.posY));
|
|
553
|
-
}
|
|
554
|
-
else {
|
|
555
|
-
const w = params.repeatX ? boundsWidth : img.size.width;
|
|
556
|
-
const h = params.repeatY ? boundsHeight : img.size.height;
|
|
557
|
-
CGContextSetPatternPhase(context, CGSizeMake(params.posX, params.posY));
|
|
558
|
-
params.posX = params.repeatX ? 0 : params.posX;
|
|
559
|
-
params.posY = params.repeatY ? 0 : params.posY;
|
|
560
|
-
const patternRect = CGRectMake(params.posX, params.posY, w, h);
|
|
561
|
-
img.drawAsPatternInRect(patternRect);
|
|
562
|
-
}
|
|
563
|
-
const bgImage = UIGraphicsGetImageFromCurrentImageContext();
|
|
564
|
-
UIGraphicsEndImageContext();
|
|
565
|
-
return flip ? _flipImage(bgImage) : bgImage;
|
|
566
|
-
}
|
|
567
|
-
// Flipping the default coordinate system
|
|
568
|
-
// https://developer.apple.com/library/ios/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GraphicsDrawingOverview/GraphicsDrawingOverview.html
|
|
569
|
-
function _flipImage(originalImage) {
|
|
570
|
-
UIGraphicsBeginImageContextWithOptions(originalImage.size, false, 0.0);
|
|
571
|
-
const context = UIGraphicsGetCurrentContext();
|
|
572
|
-
CGContextSaveGState(context);
|
|
573
|
-
CGContextTranslateCTM(context, 0.0, originalImage.size.height);
|
|
574
|
-
CGContextScaleCTM(context, 1.0, -1.0);
|
|
575
|
-
originalImage.drawInRect(CGRectMake(0, 0, originalImage.size.width, originalImage.size.height));
|
|
576
|
-
CGContextRestoreGState(context);
|
|
577
|
-
const flippedImage = UIGraphicsGetImageFromCurrentImageContext();
|
|
578
|
-
UIGraphicsEndImageContext();
|
|
579
|
-
return flippedImage;
|
|
580
|
-
}
|
|
581
|
-
function cssValueToDeviceIndependentPixels(source, total) {
|
|
582
|
-
source = source.trim();
|
|
583
|
-
if (source.indexOf('px') !== -1) {
|
|
584
|
-
return layout.toDeviceIndependentPixels(parseFloat(source.replace('px', '')));
|
|
585
|
-
}
|
|
586
|
-
else if (source.indexOf('%') !== -1 && total > 0) {
|
|
587
|
-
return (parseFloat(source.replace('%', '')) / 100) * total;
|
|
588
|
-
}
|
|
589
|
-
else {
|
|
590
|
-
return parseFloat(source);
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
function getBorderCapRadius(a, b, c) {
|
|
594
|
-
return a && Math.min(a, Math.min(b, c));
|
|
595
|
-
}
|
|
596
|
-
function calculateNonUniformBorderCappedRadii(bounds, background) {
|
|
597
|
-
const { width, height } = bounds.size;
|
|
598
|
-
const { x, y } = bounds.origin;
|
|
599
|
-
const outerTopLeftRadius = layout.toDeviceIndependentPixels(background.borderTopLeftRadius);
|
|
600
|
-
const outerTopRightRadius = layout.toDeviceIndependentPixels(background.borderTopRightRadius);
|
|
601
|
-
const outerBottomRightRadius = layout.toDeviceIndependentPixels(background.borderBottomRightRadius);
|
|
602
|
-
const outerBottomLeftRadius = layout.toDeviceIndependentPixels(background.borderBottomLeftRadius);
|
|
603
|
-
const topRadii = outerTopLeftRadius + outerTopRightRadius;
|
|
604
|
-
const rightRadii = outerTopRightRadius + outerBottomRightRadius;
|
|
605
|
-
const bottomRadii = outerBottomRightRadius + outerBottomLeftRadius;
|
|
606
|
-
const leftRadii = outerBottomLeftRadius + outerTopLeftRadius;
|
|
607
|
-
const cappedOuterRadii = {
|
|
608
|
-
topLeft: getBorderCapRadius(outerTopLeftRadius, (outerTopLeftRadius / topRadii) * width, (outerTopLeftRadius / leftRadii) * height),
|
|
609
|
-
topRight: getBorderCapRadius(outerTopRightRadius, (outerTopRightRadius / topRadii) * width, (outerTopRightRadius / rightRadii) * height),
|
|
610
|
-
bottomLeft: getBorderCapRadius(outerBottomLeftRadius, (outerBottomLeftRadius / bottomRadii) * width, (outerBottomLeftRadius / leftRadii) * height),
|
|
611
|
-
bottomRight: getBorderCapRadius(outerBottomRightRadius, (outerBottomRightRadius / bottomRadii) * width, (outerBottomRightRadius / rightRadii) * height),
|
|
612
|
-
};
|
|
613
|
-
return cappedOuterRadii;
|
|
614
|
-
}
|
|
615
|
-
function drawNonUniformBorders(nativeView, background) {
|
|
616
|
-
const layer = nativeView.layer;
|
|
617
|
-
const layerBounds = layer.bounds;
|
|
618
|
-
layer.borderColor = null;
|
|
619
|
-
layer.borderWidth = 0;
|
|
620
|
-
layer.cornerRadius = 0;
|
|
621
|
-
const cappedOuterRadii = calculateNonUniformBorderCappedRadii(layerBounds, background);
|
|
622
|
-
if (nativeView.maskType === iosViewUtils.LayerMask.BORDER && layer.mask instanceof CAShapeLayer) {
|
|
623
|
-
layer.mask.path = generateNonUniformBorderOuterClipPath(layerBounds, cappedOuterRadii);
|
|
624
|
-
}
|
|
625
|
-
if (background.hasBorderWidth()) {
|
|
626
|
-
if (!nativeView.hasNonUniformBorder) {
|
|
627
|
-
nativeView.borderLayer = CAShapeLayer.new();
|
|
628
|
-
nativeView.borderLayer.fillRule = kCAFillRuleEvenOdd;
|
|
629
|
-
layer.addSublayer(nativeView.borderLayer);
|
|
630
|
-
nativeView.hasNonUniformBorder = true;
|
|
631
|
-
}
|
|
632
|
-
if (background.hasUniformBorderColor()) {
|
|
633
|
-
// Use anti-aliasing or borders will draw incorrectly at times
|
|
634
|
-
nativeView.borderLayer.shouldRasterize = true;
|
|
635
|
-
nativeView.borderLayer.rasterizationScale = Screen.mainScreen.scale;
|
|
636
|
-
nativeView.borderLayer.fillColor = background.borderTopColor?.ios?.CGColor || UIColor.blackColor.CGColor;
|
|
637
|
-
nativeView.borderLayer.path = generateNonUniformBorderInnerClipPath(layerBounds, background, cappedOuterRadii);
|
|
638
|
-
}
|
|
639
|
-
else {
|
|
640
|
-
// Non-uniform borders need more layers in order to display multiple colors at the same time
|
|
641
|
-
let borderTopLayer, borderRightLayer, borderBottomLayer, borderLeftLayer;
|
|
642
|
-
if (!nativeView.hasNonUniformBorderColor) {
|
|
643
|
-
const maskLayer = CAShapeLayer.new();
|
|
644
|
-
maskLayer.fillRule = kCAFillRuleEvenOdd;
|
|
645
|
-
// Use anti-aliasing or borders will draw incorrectly at times
|
|
646
|
-
maskLayer.shouldRasterize = true;
|
|
647
|
-
maskLayer.rasterizationScale = Screen.mainScreen.scale;
|
|
648
|
-
nativeView.borderLayer.mask = maskLayer;
|
|
649
|
-
borderTopLayer = CAShapeLayer.new();
|
|
650
|
-
borderRightLayer = CAShapeLayer.new();
|
|
651
|
-
borderBottomLayer = CAShapeLayer.new();
|
|
652
|
-
borderLeftLayer = CAShapeLayer.new();
|
|
653
|
-
nativeView.borderLayer.addSublayer(borderTopLayer);
|
|
654
|
-
nativeView.borderLayer.addSublayer(borderRightLayer);
|
|
655
|
-
nativeView.borderLayer.addSublayer(borderBottomLayer);
|
|
656
|
-
nativeView.borderLayer.addSublayer(borderLeftLayer);
|
|
657
|
-
nativeView.hasNonUniformBorderColor = true;
|
|
658
|
-
}
|
|
659
|
-
else {
|
|
660
|
-
borderTopLayer = nativeView.borderLayer.sublayers[0];
|
|
661
|
-
borderRightLayer = nativeView.borderLayer.sublayers[1];
|
|
662
|
-
borderBottomLayer = nativeView.borderLayer.sublayers[2];
|
|
663
|
-
borderLeftLayer = nativeView.borderLayer.sublayers[3];
|
|
664
|
-
}
|
|
665
|
-
const paths = generateNonUniformMultiColorBorderPaths(layerBounds, background);
|
|
666
|
-
borderTopLayer.fillColor = background.borderTopColor?.ios?.CGColor || UIColor.blackColor.CGColor;
|
|
667
|
-
borderTopLayer.path = paths[0];
|
|
668
|
-
borderRightLayer.fillColor = background.borderRightColor?.ios?.CGColor || UIColor.blackColor.CGColor;
|
|
669
|
-
borderRightLayer.path = paths[1];
|
|
670
|
-
borderBottomLayer.fillColor = background.borderBottomColor?.ios?.CGColor || UIColor.blackColor.CGColor;
|
|
671
|
-
borderBottomLayer.path = paths[2];
|
|
672
|
-
borderLeftLayer.fillColor = background.borderLeftColor?.ios?.CGColor || UIColor.blackColor.CGColor;
|
|
673
|
-
borderLeftLayer.path = paths[3];
|
|
674
|
-
// Clip inner area to create borders
|
|
675
|
-
if (nativeView.borderLayer.mask instanceof CAShapeLayer) {
|
|
676
|
-
nativeView.borderLayer.mask.path = generateNonUniformBorderInnerClipPath(layerBounds, background, cappedOuterRadii);
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
function calculateInnerBorderClipRadius(radius, insetX, insetY) {
|
|
682
|
-
const innerXRadius = Math.max(0, radius - insetX);
|
|
683
|
-
const innerYRadius = Math.max(0, radius - insetY);
|
|
684
|
-
const innerMaxRadius = Math.max(innerXRadius, innerYRadius);
|
|
685
|
-
return {
|
|
686
|
-
xRadius: innerXRadius,
|
|
687
|
-
yRadius: innerYRadius,
|
|
688
|
-
maxRadius: innerMaxRadius,
|
|
689
|
-
};
|
|
690
|
-
}
|
|
691
|
-
/**
|
|
692
|
-
* Generates a path that represents the rounded view area.
|
|
693
|
-
*
|
|
694
|
-
* @param bounds
|
|
695
|
-
* @param cappedRadii
|
|
696
|
-
* @param offset
|
|
697
|
-
* @returns
|
|
698
|
-
*/
|
|
699
|
-
function generateNonUniformBorderOuterClipPath(bounds, cappedRadii, offset = 0) {
|
|
700
|
-
const { width, height } = bounds.size;
|
|
701
|
-
const { x, y } = bounds.origin;
|
|
702
|
-
const left = x - offset;
|
|
703
|
-
const top = y - offset;
|
|
704
|
-
const right = x + width + offset;
|
|
705
|
-
const bottom = y + height + offset;
|
|
706
|
-
const clipPath = CGPathCreateMutable();
|
|
707
|
-
CGPathMoveToPoint(clipPath, null, left + cappedRadii.topLeft, top);
|
|
708
|
-
CGPathAddArcToPoint(clipPath, null, right, top, right, top + cappedRadii.topRight, cappedRadii.topRight);
|
|
709
|
-
CGPathAddArcToPoint(clipPath, null, right, bottom, right - cappedRadii.bottomRight, bottom, cappedRadii.bottomRight);
|
|
710
|
-
CGPathAddArcToPoint(clipPath, null, left, bottom, left, bottom - cappedRadii.bottomLeft, cappedRadii.bottomLeft);
|
|
711
|
-
CGPathAddArcToPoint(clipPath, null, left, top, left + cappedRadii.topLeft, top, cappedRadii.topLeft);
|
|
712
|
-
CGPathCloseSubpath(clipPath);
|
|
713
|
-
return clipPath;
|
|
714
|
-
}
|
|
715
|
-
/**
|
|
716
|
-
* Generates a path that represents the area inside borders.
|
|
717
|
-
*
|
|
718
|
-
* @param bounds
|
|
719
|
-
* @param background
|
|
720
|
-
* @param cappedOuterRadii
|
|
721
|
-
* @returns
|
|
722
|
-
*/
|
|
723
|
-
function generateNonUniformBorderInnerClipPath(bounds, background, cappedOuterRadii) {
|
|
724
|
-
const { width, height } = bounds.size;
|
|
725
|
-
const { x, y } = bounds.origin;
|
|
726
|
-
const position = {
|
|
727
|
-
left: x,
|
|
728
|
-
top: y,
|
|
729
|
-
bottom: y + height,
|
|
730
|
-
right: x + width,
|
|
731
|
-
};
|
|
732
|
-
const borderTopWidth = Math.max(0, layout.toDeviceIndependentPixels(background.borderTopWidth));
|
|
733
|
-
const borderRightWidth = Math.max(0, layout.toDeviceIndependentPixels(background.borderRightWidth));
|
|
734
|
-
const borderBottomWidth = Math.max(0, layout.toDeviceIndependentPixels(background.borderBottomWidth));
|
|
735
|
-
const borderLeftWidth = Math.max(0, layout.toDeviceIndependentPixels(background.borderLeftWidth));
|
|
736
|
-
const borderVWidth = borderTopWidth + borderBottomWidth;
|
|
737
|
-
const borderHWidth = borderLeftWidth + borderRightWidth;
|
|
738
|
-
const cappedBorderTopWidth = borderTopWidth && borderTopWidth * Math.min(1, height / borderVWidth);
|
|
739
|
-
const cappedBorderRightWidth = borderRightWidth && borderRightWidth * Math.min(1, width / borderHWidth);
|
|
740
|
-
const cappedBorderBottomWidth = borderBottomWidth && borderBottomWidth * Math.min(1, height / borderVWidth);
|
|
741
|
-
const cappedBorderLeftWidth = borderLeftWidth && borderLeftWidth * Math.min(1, width / borderHWidth);
|
|
742
|
-
const clipPath = CGPathCreateMutable();
|
|
743
|
-
CGPathAddRect(clipPath, null, CGRectMake(x, y, width, height));
|
|
744
|
-
// Inner clip paths
|
|
745
|
-
if (cappedBorderTopWidth > 0 || cappedBorderLeftWidth > 0) {
|
|
746
|
-
CGPathMoveToPoint(clipPath, null, position.left + cappedOuterRadii.topLeft, position.top + cappedBorderTopWidth);
|
|
747
|
-
}
|
|
748
|
-
else {
|
|
749
|
-
CGPathMoveToPoint(clipPath, null, position.left, position.top);
|
|
750
|
-
}
|
|
751
|
-
if (cappedBorderTopWidth > 0 || cappedBorderRightWidth > 0) {
|
|
752
|
-
const { xRadius, yRadius, maxRadius } = calculateInnerBorderClipRadius(cappedOuterRadii.topRight, cappedBorderRightWidth, cappedBorderTopWidth);
|
|
753
|
-
const innerTopRightTransform = CGAffineTransformMake(maxRadius && xRadius / maxRadius, 0, 0, maxRadius && yRadius / maxRadius, position.right - cappedBorderRightWidth - xRadius, position.top + cappedBorderTopWidth + yRadius);
|
|
754
|
-
CGPathAddArc(clipPath, innerTopRightTransform, 0, 0, maxRadius, (Math.PI * 3) / 2, 0, false);
|
|
755
|
-
}
|
|
756
|
-
else {
|
|
757
|
-
CGPathAddLineToPoint(clipPath, null, position.right, position.top);
|
|
758
|
-
}
|
|
759
|
-
if (cappedBorderBottomWidth > 0 || cappedBorderRightWidth > 0) {
|
|
760
|
-
const { xRadius, yRadius, maxRadius } = calculateInnerBorderClipRadius(cappedOuterRadii.bottomRight, cappedBorderRightWidth, cappedBorderBottomWidth);
|
|
761
|
-
const innerBottomRightTransform = CGAffineTransformMake(maxRadius && xRadius / maxRadius, 0, 0, maxRadius && yRadius / maxRadius, position.right - cappedBorderRightWidth - xRadius, position.bottom - cappedBorderBottomWidth - yRadius);
|
|
762
|
-
CGPathAddArc(clipPath, innerBottomRightTransform, 0, 0, maxRadius, 0, Math.PI / 2, false);
|
|
763
|
-
}
|
|
764
|
-
else {
|
|
765
|
-
CGPathAddLineToPoint(clipPath, null, position.right, position.bottom);
|
|
766
|
-
}
|
|
767
|
-
if (cappedBorderBottomWidth > 0 || cappedBorderLeftWidth > 0) {
|
|
768
|
-
const { xRadius, yRadius, maxRadius } = calculateInnerBorderClipRadius(cappedOuterRadii.bottomLeft, cappedBorderLeftWidth, cappedBorderBottomWidth);
|
|
769
|
-
const innerBottomLeftTransform = CGAffineTransformMake(maxRadius && xRadius / maxRadius, 0, 0, maxRadius && yRadius / maxRadius, position.left + cappedBorderLeftWidth + xRadius, position.bottom - cappedBorderBottomWidth - yRadius);
|
|
770
|
-
CGPathAddArc(clipPath, innerBottomLeftTransform, 0, 0, maxRadius, Math.PI / 2, Math.PI, false);
|
|
771
|
-
}
|
|
772
|
-
else {
|
|
773
|
-
CGPathAddLineToPoint(clipPath, null, position.left, position.bottom);
|
|
774
|
-
}
|
|
775
|
-
if (cappedBorderTopWidth > 0 || cappedBorderLeftWidth > 0) {
|
|
776
|
-
const { xRadius, yRadius, maxRadius } = calculateInnerBorderClipRadius(cappedOuterRadii.topLeft, cappedBorderLeftWidth, cappedBorderTopWidth);
|
|
777
|
-
const innerTopLeftTransform = CGAffineTransformMake(maxRadius && xRadius / maxRadius, 0, 0, maxRadius && yRadius / maxRadius, position.left + cappedBorderLeftWidth + xRadius, position.top + cappedBorderTopWidth + yRadius);
|
|
778
|
-
CGPathAddArc(clipPath, innerTopLeftTransform, 0, 0, maxRadius, Math.PI, (Math.PI * 3) / 2, false);
|
|
779
|
-
}
|
|
780
|
-
else {
|
|
781
|
-
CGPathAddLineToPoint(clipPath, null, position.left, position.top);
|
|
782
|
-
}
|
|
783
|
-
CGPathCloseSubpath(clipPath);
|
|
784
|
-
return clipPath;
|
|
785
|
-
}
|
|
786
|
-
/**
|
|
787
|
-
* Calculates the needed widths for creating triangular shapes for each border.
|
|
788
|
-
* To achieve this, all border widths are scaled according to view bounds.
|
|
789
|
-
*
|
|
790
|
-
* @param bounds
|
|
791
|
-
* @param background
|
|
792
|
-
* @returns
|
|
793
|
-
*/
|
|
794
|
-
function getBorderTriangleWidths(bounds, background) {
|
|
795
|
-
const width = bounds.origin.x + bounds.size.width;
|
|
796
|
-
const height = bounds.origin.y + bounds.size.height;
|
|
797
|
-
const borderTopWidth = Math.max(0, layout.toDeviceIndependentPixels(background.borderTopWidth));
|
|
798
|
-
const borderRightWidth = Math.max(0, layout.toDeviceIndependentPixels(background.borderRightWidth));
|
|
799
|
-
const borderBottomWidth = Math.max(0, layout.toDeviceIndependentPixels(background.borderBottomWidth));
|
|
800
|
-
const borderLeftWidth = Math.max(0, layout.toDeviceIndependentPixels(background.borderLeftWidth));
|
|
801
|
-
const verticalBorderWidth = borderTopWidth + borderBottomWidth;
|
|
802
|
-
const horizontalBorderWidth = borderLeftWidth + borderRightWidth;
|
|
803
|
-
let verticalBorderMultiplier = verticalBorderWidth > 0 ? height / verticalBorderWidth : 0;
|
|
804
|
-
let horizontalBorderMultiplier = horizontalBorderWidth > 0 ? width / horizontalBorderWidth : 0;
|
|
805
|
-
// Both directions should consider each other in order to scale widths properly, as a view might have different width and height
|
|
806
|
-
if (verticalBorderMultiplier > 0 && verticalBorderMultiplier < horizontalBorderMultiplier) {
|
|
807
|
-
horizontalBorderMultiplier -= horizontalBorderMultiplier - verticalBorderMultiplier;
|
|
808
|
-
}
|
|
809
|
-
if (horizontalBorderMultiplier > 0 && horizontalBorderMultiplier < verticalBorderMultiplier) {
|
|
810
|
-
verticalBorderMultiplier -= verticalBorderMultiplier - horizontalBorderMultiplier;
|
|
811
|
-
}
|
|
812
|
-
return {
|
|
813
|
-
top: borderTopWidth * verticalBorderMultiplier,
|
|
814
|
-
right: borderRightWidth * horizontalBorderMultiplier,
|
|
815
|
-
bottom: borderBottomWidth * verticalBorderMultiplier,
|
|
816
|
-
left: borderLeftWidth * horizontalBorderMultiplier,
|
|
817
|
-
};
|
|
818
|
-
}
|
|
819
|
-
/**
|
|
820
|
-
* Generates paths for visualizing borders with different colors per side.
|
|
821
|
-
* This is achieved by extending all borders enough to consume entire view size,
|
|
822
|
-
* then using an even-odd inner mask to clip and eventually render borders according to their corresponding width.
|
|
823
|
-
*
|
|
824
|
-
* @param bounds
|
|
825
|
-
* @param background
|
|
826
|
-
* @returns
|
|
827
|
-
*/
|
|
828
|
-
function generateNonUniformMultiColorBorderPaths(bounds, background) {
|
|
829
|
-
const { width, height } = bounds.size;
|
|
830
|
-
const { x, y } = bounds.origin;
|
|
831
|
-
const position = {
|
|
832
|
-
left: x,
|
|
833
|
-
top: y,
|
|
834
|
-
bottom: y + height,
|
|
835
|
-
right: x + width,
|
|
836
|
-
};
|
|
837
|
-
const borderWidths = getBorderTriangleWidths(bounds, background);
|
|
838
|
-
const paths = new Array(4);
|
|
839
|
-
const lto = {
|
|
840
|
-
x: position.left,
|
|
841
|
-
y: position.top,
|
|
842
|
-
}; // left-top-outside
|
|
843
|
-
const lti = {
|
|
844
|
-
x: position.left + borderWidths.left,
|
|
845
|
-
y: position.top + borderWidths.top,
|
|
846
|
-
}; // left-top-inside
|
|
847
|
-
const rto = {
|
|
848
|
-
x: position.right,
|
|
849
|
-
y: position.top,
|
|
850
|
-
}; // right-top-outside
|
|
851
|
-
const rti = {
|
|
852
|
-
x: position.right - borderWidths.right,
|
|
853
|
-
y: position.top + borderWidths.top,
|
|
854
|
-
}; // right-top-inside
|
|
855
|
-
const rbo = {
|
|
856
|
-
x: position.right,
|
|
857
|
-
y: position.bottom,
|
|
858
|
-
}; // right-bottom-outside
|
|
859
|
-
const rbi = {
|
|
860
|
-
x: position.right - borderWidths.right,
|
|
861
|
-
y: position.bottom - borderWidths.bottom,
|
|
862
|
-
}; // right-bottom-inside
|
|
863
|
-
const lbo = {
|
|
864
|
-
x: position.left,
|
|
865
|
-
y: position.bottom,
|
|
866
|
-
}; // left-bottom-outside
|
|
867
|
-
const lbi = {
|
|
868
|
-
x: position.left + borderWidths.left,
|
|
869
|
-
y: position.bottom - borderWidths.bottom,
|
|
870
|
-
}; // left-bottom-inside
|
|
871
|
-
const borderTopColor = background.borderTopColor;
|
|
872
|
-
const borderRightColor = background.borderRightColor;
|
|
873
|
-
const borderBottomColor = background.borderBottomColor;
|
|
874
|
-
const borderLeftColor = background.borderLeftColor;
|
|
875
|
-
if (borderWidths.top > 0 && borderTopColor?.ios) {
|
|
876
|
-
const topBorderPath = CGPathCreateMutable();
|
|
877
|
-
CGPathMoveToPoint(topBorderPath, null, lto.x, lto.y);
|
|
878
|
-
CGPathAddLineToPoint(topBorderPath, null, rto.x, rto.y);
|
|
879
|
-
CGPathAddLineToPoint(topBorderPath, null, rti.x, rti.y);
|
|
880
|
-
if (rti.x !== lti.x) {
|
|
881
|
-
CGPathAddLineToPoint(topBorderPath, null, lti.x, lti.y);
|
|
882
|
-
}
|
|
883
|
-
CGPathAddLineToPoint(topBorderPath, null, lto.x, lto.y);
|
|
884
|
-
paths[0] = topBorderPath;
|
|
885
|
-
}
|
|
886
|
-
if (borderWidths.right > 0 && borderRightColor?.ios) {
|
|
887
|
-
const rightBorderPath = CGPathCreateMutable();
|
|
888
|
-
CGPathMoveToPoint(rightBorderPath, null, rto.x, rto.y);
|
|
889
|
-
CGPathAddLineToPoint(rightBorderPath, null, rbo.x, rbo.y);
|
|
890
|
-
CGPathAddLineToPoint(rightBorderPath, null, rbi.x, rbi.y);
|
|
891
|
-
if (rbi.y !== rti.y) {
|
|
892
|
-
CGPathAddLineToPoint(rightBorderPath, null, rti.x, rti.y);
|
|
893
|
-
}
|
|
894
|
-
CGPathAddLineToPoint(rightBorderPath, null, rto.x, rto.y);
|
|
895
|
-
paths[1] = rightBorderPath;
|
|
896
|
-
}
|
|
897
|
-
if (borderWidths.bottom > 0 && borderBottomColor?.ios) {
|
|
898
|
-
const bottomBorderPath = CGPathCreateMutable();
|
|
899
|
-
CGPathMoveToPoint(bottomBorderPath, null, rbo.x, rbo.y);
|
|
900
|
-
CGPathAddLineToPoint(bottomBorderPath, null, lbo.x, lbo.y);
|
|
901
|
-
CGPathAddLineToPoint(bottomBorderPath, null, lbi.x, lbi.y);
|
|
902
|
-
if (lbi.x !== rbi.x) {
|
|
903
|
-
CGPathAddLineToPoint(bottomBorderPath, null, rbi.x, rbi.y);
|
|
904
|
-
}
|
|
905
|
-
CGPathAddLineToPoint(bottomBorderPath, null, rbo.x, rbo.y);
|
|
906
|
-
paths[2] = bottomBorderPath;
|
|
907
|
-
}
|
|
908
|
-
if (borderWidths.left > 0 && borderLeftColor?.ios) {
|
|
909
|
-
const leftBorderPath = CGPathCreateMutable();
|
|
910
|
-
CGPathMoveToPoint(leftBorderPath, null, lbo.x, lbo.y);
|
|
911
|
-
CGPathAddLineToPoint(leftBorderPath, null, lto.x, lto.y);
|
|
912
|
-
CGPathAddLineToPoint(leftBorderPath, null, lti.x, lti.y);
|
|
913
|
-
if (lti.y !== lbi.y) {
|
|
914
|
-
CGPathAddLineToPoint(leftBorderPath, null, lbi.x, lbi.y);
|
|
915
|
-
}
|
|
916
|
-
CGPathAddLineToPoint(leftBorderPath, null, lbo.x, lbo.y);
|
|
917
|
-
paths[3] = leftBorderPath;
|
|
918
|
-
}
|
|
919
|
-
return paths;
|
|
920
|
-
}
|
|
921
|
-
function drawBoxShadow(view) {
|
|
922
|
-
const background = view.style.backgroundInternal;
|
|
923
|
-
const nativeView = view.nativeViewProtected;
|
|
924
|
-
const layer = nativeView.layer;
|
|
925
|
-
// There is no parent to add shadow to
|
|
926
|
-
if (!layer.superlayer) {
|
|
927
|
-
return;
|
|
928
|
-
}
|
|
929
|
-
const bounds = nativeView.bounds;
|
|
930
|
-
const boxShadows = background.getBoxShadows();
|
|
931
|
-
// Initialize outer shadows
|
|
932
|
-
let shadowGroupLayer;
|
|
933
|
-
if (nativeView.outerShadowContainerLayer) {
|
|
934
|
-
shadowGroupLayer = nativeView.outerShadowContainerLayer;
|
|
935
|
-
}
|
|
936
|
-
else {
|
|
937
|
-
shadowGroupLayer = CALayer.new();
|
|
938
|
-
// Instead of nesting it, add shadow container layer underneath view so that it's not affected by border masking
|
|
939
|
-
layer.superlayer.insertSublayerBelow(shadowGroupLayer, layer);
|
|
940
|
-
nativeView.outerShadowContainerLayer = shadowGroupLayer;
|
|
941
|
-
}
|
|
942
|
-
// Check if the number of shadow layers is correct
|
|
943
|
-
if (!shadowGroupLayer.sublayers || boxShadows.length > shadowGroupLayer.sublayers.count) {
|
|
944
|
-
const length = shadowGroupLayer.sublayers ? boxShadows.length - shadowGroupLayer.sublayers.count : boxShadows.length;
|
|
945
|
-
for (let i = 0; i < length; i++) {
|
|
946
|
-
const shadowLayer = CALayer.new();
|
|
947
|
-
// This mask is necessary to maintain transparent background
|
|
948
|
-
const maskLayer = CAShapeLayer.new();
|
|
949
|
-
maskLayer.fillRule = kCAFillRuleEvenOdd;
|
|
950
|
-
shadowLayer.mask = maskLayer;
|
|
951
|
-
shadowGroupLayer.addSublayer(shadowLayer);
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
else if (shadowGroupLayer.sublayers && boxShadows.length < shadowGroupLayer.sublayers.count) {
|
|
955
|
-
for (let i = 0, length = shadowGroupLayer.sublayers.count - boxShadows.length; i < length; i++) {
|
|
956
|
-
shadowGroupLayer.sublayers[i].removeFromSuperlayer();
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
if (shadowGroupLayer.sublayers?.count) {
|
|
960
|
-
for (let i = 0, count = shadowGroupLayer.sublayers.count; i < count; i++) {
|
|
961
|
-
const shadowLayer = shadowGroupLayer.sublayers[i];
|
|
962
|
-
const boxShadow = boxShadows[i];
|
|
963
|
-
const shadowRadius = layout.toDeviceIndependentPixels(boxShadow.blurRadius);
|
|
964
|
-
const offsetX = layout.toDeviceIndependentPixels(boxShadow.offsetX);
|
|
965
|
-
const offsetY = layout.toDeviceIndependentPixels(boxShadow.offsetY);
|
|
966
|
-
const { maskPath, shadowPath } = ios.generateShadowLayerPaths(view, boxShadow, bounds);
|
|
967
|
-
shadowLayer.allowsEdgeAntialiasing = true;
|
|
968
|
-
shadowLayer.contentsScale = Screen.mainScreen.scale;
|
|
969
|
-
// Shadow opacity is handled on the shadow's color instance
|
|
970
|
-
shadowLayer.shadowOpacity = boxShadow.color?.a ? boxShadow.color.a / 255 : 1;
|
|
971
|
-
// Use this multiplier to imitate CSS shadow blur
|
|
972
|
-
shadowLayer.shadowRadius = shadowRadius * 0.5;
|
|
973
|
-
shadowLayer.shadowColor = boxShadow.color?.ios?.CGColor;
|
|
974
|
-
shadowLayer.shadowOffset = CGSizeMake(offsetX, offsetY);
|
|
975
|
-
// Apply spread radius by expanding shadow layer bounds (this has a nice glow with radii set to 0)
|
|
976
|
-
shadowLayer.shadowPath = shadowPath;
|
|
977
|
-
// A mask that ensures that view maintains transparent background
|
|
978
|
-
if (shadowLayer.mask instanceof CAShapeLayer) {
|
|
979
|
-
shadowLayer.mask.path = maskPath;
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
// Apply clip path to shadow
|
|
984
|
-
if (nativeView.maskType === iosViewUtils.LayerMask.CLIP_PATH && layer.mask instanceof CAShapeLayer) {
|
|
985
|
-
if (!shadowGroupLayer.mask) {
|
|
986
|
-
shadowGroupLayer.mask = CAShapeLayer.new();
|
|
987
|
-
}
|
|
988
|
-
if (shadowGroupLayer.mask instanceof CAShapeLayer) {
|
|
989
|
-
shadowGroupLayer.mask.path = layer.mask.path;
|
|
990
|
-
}
|
|
991
|
-
}
|
|
992
|
-
shadowGroupLayer.bounds = bounds;
|
|
993
|
-
shadowGroupLayer.transform = layer.transform;
|
|
994
|
-
shadowGroupLayer.anchorPoint = layer.anchorPoint;
|
|
995
|
-
shadowGroupLayer.position = nativeView.center;
|
|
996
|
-
shadowGroupLayer.zPosition = layer.zPosition;
|
|
997
|
-
// Inherit view visibility values
|
|
998
|
-
shadowGroupLayer.opacity = layer.opacity;
|
|
999
|
-
shadowGroupLayer.hidden = layer.hidden;
|
|
1000
|
-
}
|
|
1001
|
-
function clearBoxShadow(nativeView) {
|
|
1002
|
-
if (nativeView.outerShadowContainerLayer) {
|
|
1003
|
-
nativeView.outerShadowContainerLayer.removeFromSuperlayer();
|
|
1004
|
-
nativeView.outerShadowContainerLayer = null;
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
/**
|
|
1008
|
-
* Creates a mask that ensures no shadow will be displayed underneath transparent backgrounds.
|
|
1009
|
-
*
|
|
1010
|
-
* @param bounds
|
|
1011
|
-
* @param boxShadow
|
|
1012
|
-
* @param bordersClipPath
|
|
1013
|
-
* @returns
|
|
1014
|
-
*/
|
|
1015
|
-
function generateShadowMaskPath(bounds, boxShadow, innerClipPath) {
|
|
1016
|
-
const shadowRadius = layout.toDeviceIndependentPixels(boxShadow.blurRadius);
|
|
1017
|
-
const spreadRadius = layout.toDeviceIndependentPixels(boxShadow.spreadRadius);
|
|
1018
|
-
const offsetX = layout.toDeviceIndependentPixels(boxShadow.offsetX);
|
|
1019
|
-
const offsetY = layout.toDeviceIndependentPixels(boxShadow.offsetY);
|
|
1020
|
-
// This value has to be large enough to avoid clipping shadow halo effect
|
|
1021
|
-
const outerRectRadius = shadowRadius * 3 + spreadRadius;
|
|
1022
|
-
const maskPath = CGPathCreateMutable();
|
|
1023
|
-
// Proper clip position and size
|
|
1024
|
-
const outerRect = CGRectOffset(CGRectInset(bounds, -outerRectRadius, -outerRectRadius), offsetX, offsetY);
|
|
1025
|
-
CGPathAddPath(maskPath, null, innerClipPath);
|
|
1026
|
-
CGPathAddRect(maskPath, null, outerRect);
|
|
1027
|
-
return maskPath;
|
|
1028
|
-
}
|
|
1029
|
-
function rectPath(value, position) {
|
|
1030
|
-
const arr = value.split(/[\s]+/);
|
|
1031
|
-
const top = cssValueToDeviceIndependentPixels(arr[0], position.top);
|
|
1032
|
-
const right = cssValueToDeviceIndependentPixels(arr[1], position.right);
|
|
1033
|
-
const bottom = cssValueToDeviceIndependentPixels(arr[2], position.bottom);
|
|
1034
|
-
const left = cssValueToDeviceIndependentPixels(arr[3], position.left);
|
|
1035
|
-
return UIBezierPath.bezierPathWithRect(CGRectMake(left, top, right - left, bottom - top)).CGPath;
|
|
1036
|
-
}
|
|
1037
|
-
function insetPath(value, position) {
|
|
1038
|
-
const arr = value.split(/[\s]+/);
|
|
1039
|
-
let topString;
|
|
1040
|
-
let rightString;
|
|
1041
|
-
let bottomString;
|
|
1042
|
-
let leftString;
|
|
1043
|
-
if (arr.length === 1) {
|
|
1044
|
-
topString = rightString = bottomString = leftString = arr[0];
|
|
1045
|
-
}
|
|
1046
|
-
else if (arr.length === 2) {
|
|
1047
|
-
topString = bottomString = arr[0];
|
|
1048
|
-
rightString = leftString = arr[1];
|
|
1049
|
-
}
|
|
1050
|
-
else if (arr.length === 3) {
|
|
1051
|
-
topString = arr[0];
|
|
1052
|
-
rightString = leftString = arr[1];
|
|
1053
|
-
bottomString = arr[2];
|
|
1054
|
-
}
|
|
1055
|
-
else if (arr.length === 4) {
|
|
1056
|
-
topString = arr[0];
|
|
1057
|
-
rightString = arr[1];
|
|
1058
|
-
bottomString = arr[2];
|
|
1059
|
-
leftString = arr[3];
|
|
1060
|
-
}
|
|
1061
|
-
const top = cssValueToDeviceIndependentPixels(topString, position.bottom);
|
|
1062
|
-
const right = cssValueToDeviceIndependentPixels('100%', position.right) - cssValueToDeviceIndependentPixels(rightString, position.right);
|
|
1063
|
-
const bottom = cssValueToDeviceIndependentPixels('100%', position.bottom) - cssValueToDeviceIndependentPixels(bottomString, position.bottom);
|
|
1064
|
-
const left = cssValueToDeviceIndependentPixels(leftString, position.right);
|
|
1065
|
-
return UIBezierPath.bezierPathWithRect(CGRectMake(left, top, right - left, bottom - top)).CGPath;
|
|
1066
|
-
}
|
|
1067
|
-
function circlePath(value, position) {
|
|
1068
|
-
const arr = value.split(/[\s]+/);
|
|
1069
|
-
const radius = cssValueToDeviceIndependentPixels(arr[0], (position.right > position.bottom ? position.bottom : position.right) / 2);
|
|
1070
|
-
const y = cssValueToDeviceIndependentPixels(arr[2], position.bottom);
|
|
1071
|
-
const x = cssValueToDeviceIndependentPixels(arr[3], position.right);
|
|
1072
|
-
return UIBezierPath.bezierPathWithArcCenterRadiusStartAngleEndAngleClockwise(CGPointMake(x, y), radius, 0, 360, true).CGPath;
|
|
1073
|
-
}
|
|
1074
|
-
function ellipsePath(value, position) {
|
|
1075
|
-
const arr = value.split(/[\s]+/);
|
|
1076
|
-
const rX = cssValueToDeviceIndependentPixels(arr[0], position.right);
|
|
1077
|
-
const rY = cssValueToDeviceIndependentPixels(arr[1], position.bottom);
|
|
1078
|
-
const cX = cssValueToDeviceIndependentPixels(arr[3], position.right);
|
|
1079
|
-
const cY = cssValueToDeviceIndependentPixels(arr[4], position.bottom);
|
|
1080
|
-
const left = cX - rX;
|
|
1081
|
-
const top = cY - rY;
|
|
1082
|
-
const width = rX * 2;
|
|
1083
|
-
const height = rY * 2;
|
|
1084
|
-
return UIBezierPath.bezierPathWithOvalInRect(CGRectMake(left, top, width, height)).CGPath;
|
|
1085
|
-
}
|
|
1086
|
-
function polygonPath(value, position) {
|
|
1087
|
-
const path = CGPathCreateMutable();
|
|
1088
|
-
let firstPoint;
|
|
1089
|
-
const arr = value.split(/[,]+/);
|
|
1090
|
-
for (let i = 0; i < arr.length; i++) {
|
|
1091
|
-
const xy = arr[i].trim().split(/[\s]+/);
|
|
1092
|
-
const point = {
|
|
1093
|
-
x: cssValueToDeviceIndependentPixels(xy[0], position.right),
|
|
1094
|
-
y: cssValueToDeviceIndependentPixels(xy[1], position.bottom),
|
|
1095
|
-
};
|
|
1096
|
-
if (!firstPoint) {
|
|
1097
|
-
firstPoint = point;
|
|
1098
|
-
CGPathMoveToPoint(path, null, point.x, point.y);
|
|
1099
|
-
}
|
|
1100
|
-
CGPathAddLineToPoint(path, null, point.x, point.y);
|
|
1101
|
-
}
|
|
1102
|
-
CGPathAddLineToPoint(path, null, firstPoint.x, firstPoint.y);
|
|
1103
|
-
return path;
|
|
1104
|
-
}
|
|
1105
|
-
//# sourceMappingURL=background.ios.js.map
|