@akylas/nativescript 8.8.10 → 8.9.4
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/accessibility/accessibility-css-helper.js +45 -0
- package/accessibility/accessibility-css-helper.js.map +1 -1
- package/color/color-common.js +7 -185
- package/color/color-common.js.map +1 -1
- package/color/color-utils.d.ts +38 -0
- package/color/color-utils.js +213 -0
- package/color/color-utils.js.map +1 -0
- package/config/config.interface.d.ts +23 -4
- package/core-types/index.d.ts +15 -15
- package/core-types/index.js +3 -5
- package/core-types/index.js.map +1 -1
- package/css/parser.js +2 -1
- package/css/parser.js.map +1 -1
- package/data/observable/index.d.ts +2 -0
- package/data/observable/index.js +2 -0
- package/data/observable/index.js.map +1 -1
- package/globals/index.js +5 -3
- package/globals/index.js.map +1 -1
- package/http/http-request/index.ios.js +5 -1
- package/http/http-request/index.ios.js.map +1 -1
- package/http/index.d.ts +1 -1
- package/image-source/index.android.d.ts +3 -2
- package/image-source/index.android.js +13 -6
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.d.ts +8 -2
- package/image-source/index.ios.d.ts +7 -4
- package/image-source/index.ios.js +21 -9
- package/image-source/index.ios.js.map +1 -1
- package/index.d.ts +1 -2
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/media-query-list/index.d.ts +1 -1
- package/media-query-list/index.js +2 -2
- package/media-query-list/index.js.map +1 -1
- package/package.json +2 -2
- package/platform/common.d.ts +1 -0
- package/platform/common.js +1 -0
- package/platform/common.js.map +1 -1
- package/platforms/android/widgets-release.aar +0 -0
- package/profiling/index.js +18 -20
- package/profiling/index.js.map +1 -1
- package/ui/action-bar/action-bar-common.d.ts +4 -0
- package/ui/action-bar/action-bar-common.js +8 -0
- package/ui/action-bar/action-bar-common.js.map +1 -1
- package/ui/action-bar/index.android.d.ts +8 -1
- package/ui/action-bar/index.d.ts +33 -0
- package/ui/action-bar/index.ios.d.ts +29 -3
- package/ui/action-bar/index.ios.js +160 -25
- package/ui/action-bar/index.ios.js.map +1 -1
- package/ui/activity-indicator/activity-indicator-common.d.ts +3 -1
- package/ui/activity-indicator/activity-indicator-common.js +5 -0
- package/ui/activity-indicator/activity-indicator-common.js.map +1 -1
- package/ui/activity-indicator/index.android.d.ts +10 -1
- package/ui/activity-indicator/index.d.ts +11 -0
- package/ui/activity-indicator/index.ios.d.ts +10 -2
- package/ui/activity-indicator/index.ios.js +18 -12
- package/ui/activity-indicator/index.ios.js.map +1 -1
- package/ui/animation/animation-common.d.ts +1 -8
- package/ui/animation/animation-common.js +0 -8
- package/ui/animation/animation-common.js.map +1 -1
- package/ui/animation/animation-interfaces.d.ts +20 -4
- package/ui/animation/animation-interfaces.js +12 -1
- package/ui/animation/animation-interfaces.js.map +1 -1
- package/ui/animation/index.android.d.ts +2 -2
- package/ui/animation/index.android.js +2 -2
- package/ui/animation/index.android.js.map +1 -1
- package/ui/animation/index.d.ts +1 -14
- package/ui/animation/index.ios.d.ts +2 -2
- package/ui/animation/index.ios.js +18 -34
- package/ui/animation/index.ios.js.map +1 -1
- package/ui/builder/index.d.ts +1 -0
- package/ui/builder/index.js +1 -0
- package/ui/builder/index.js.map +1 -1
- package/ui/builder/xml2ui.js +4 -3
- package/ui/builder/xml2ui.js.map +1 -1
- package/ui/button/index.android.d.ts +15 -1
- package/ui/button/index.android.js +15 -15
- package/ui/button/index.android.js.map +1 -1
- package/ui/button/index.d.ts +11 -0
- package/ui/button/index.ios.d.ts +24 -2
- package/ui/button/index.ios.js +28 -7
- package/ui/button/index.ios.js.map +1 -1
- package/ui/core/control-state-change/index.android.d.ts +2 -2
- package/ui/core/control-state-change/index.android.js +1 -1
- package/ui/core/control-state-change/index.android.js.map +1 -1
- package/ui/core/control-state-change/index.d.ts +4 -2
- package/ui/core/control-state-change/index.ios.d.ts +3 -7
- package/ui/core/control-state-change/index.ios.js +18 -36
- package/ui/core/control-state-change/index.ios.js.map +1 -1
- package/ui/core/properties/index.d.ts +2 -0
- package/ui/core/properties/index.js +37 -20
- package/ui/core/properties/index.js.map +1 -1
- package/ui/core/view/index.android.d.ts +54 -12
- package/ui/core/view/index.android.js +53 -53
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.d.ts +234 -15
- package/ui/core/view/index.ios.d.ts +59 -18
- package/ui/core/view/index.ios.js +35 -37
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.d.ts +13 -17
- package/ui/core/view/view-common.js +43 -26
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.d.ts +3 -3
- package/ui/core/view/view-helper/index.ios.d.ts +14 -18
- package/ui/core/view/view-helper/index.ios.js +21 -6
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view-base/index.d.ts +109 -6
- package/ui/core/view-base/index.js +58 -10
- package/ui/core/view-base/index.js.map +1 -1
- package/ui/date-picker/date-picker-common.d.ts +1 -0
- package/ui/date-picker/date-picker-common.js +1 -0
- package/ui/date-picker/date-picker-common.js.map +1 -1
- package/ui/date-picker/index.android.d.ts +9 -1
- package/ui/date-picker/index.d.ts +30 -0
- package/ui/date-picker/index.ios.d.ts +18 -1
- package/ui/dialogs/index.android.js +1 -1
- package/ui/dialogs/index.android.js.map +1 -1
- package/ui/editable-text-base/editable-text-base-common.d.ts +2 -3
- package/ui/editable-text-base/editable-text-base-common.js +21 -8
- package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
- package/ui/editable-text-base/index.android.d.ts +25 -2
- package/ui/editable-text-base/index.android.js +2 -0
- package/ui/editable-text-base/index.android.js.map +1 -1
- package/ui/editable-text-base/index.d.ts +42 -0
- package/ui/editable-text-base/index.ios.d.ts +13 -1
- package/ui/frame/callbacks/activity-callbacks.js.map +1 -1
- package/ui/frame/fragment.transitions.android.d.ts +3 -0
- package/ui/frame/fragment.transitions.android.js +52 -10
- package/ui/frame/fragment.transitions.android.js.map +1 -1
- package/ui/frame/fragment.transitions.d.ts +9 -1
- package/ui/frame/frame-common.d.ts +6 -3
- package/ui/frame/frame-common.js +39 -10
- package/ui/frame/frame-common.js.map +1 -1
- package/ui/frame/frame-interfaces.d.ts +22 -19
- package/ui/frame/frame-stack.d.ts +1 -0
- package/ui/frame/frame-stack.js +3 -0
- package/ui/frame/frame-stack.js.map +1 -1
- package/ui/frame/index.android.d.ts +10 -1
- package/ui/frame/index.android.js +82 -68
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.d.ts +47 -8
- package/ui/frame/index.ios.d.ts +3 -4
- package/ui/frame/index.ios.js +37 -35
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/gestures/gestures-common.d.ts +22 -0
- package/ui/gestures/gestures-common.js +22 -0
- package/ui/gestures/gestures-common.js.map +1 -1
- package/ui/gestures/index.android.d.ts +1 -1
- package/ui/gestures/index.ios.d.ts +1 -1
- package/ui/gestures/index.ios.js.map +1 -1
- package/ui/gestures/touch-manager.d.ts +1 -1
- package/ui/gestures/touch-manager.js +1 -2
- package/ui/gestures/touch-manager.js.map +1 -1
- package/ui/html-view/html-view-common.d.ts +2 -3
- package/ui/html-view/html-view-common.js +2 -5
- package/ui/html-view/html-view-common.js.map +1 -1
- package/ui/html-view/index.android.d.ts +20 -1
- package/ui/html-view/index.d.ts +19 -2
- package/ui/html-view/index.ios.d.ts +13 -2
- package/ui/html-view/index.ios.js +25 -28
- package/ui/html-view/index.ios.js.map +1 -1
- package/ui/image/image-common.d.ts +2 -0
- package/ui/image/image-common.js +7 -3
- package/ui/image/image-common.js.map +1 -1
- package/ui/image/index.android.d.ts +10 -1
- package/ui/image/index.d.ts +43 -1
- package/ui/image/index.ios.d.ts +10 -1
- package/ui/image/index.ios.js.map +1 -1
- package/ui/index.d.ts +3 -1
- package/ui/index.js +1 -1
- package/ui/index.js.map +1 -1
- package/ui/label/index.android.d.ts +3 -1
- package/ui/label/index.d.ts +4 -0
- package/ui/label/index.ios.d.ts +15 -1
- package/ui/label/index.ios.js +5 -1
- package/ui/label/index.ios.js.map +1 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.js +4 -2
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
- package/ui/layouts/absolute-layout/index.d.ts +2 -0
- package/ui/layouts/dock-layout/index.android.d.ts +3 -1
- package/ui/layouts/dock-layout/index.d.ts +5 -1
- package/ui/layouts/flexbox-layout/index.android.d.ts +6 -1
- package/ui/layouts/flexbox-layout/index.d.ts +33 -0
- package/ui/layouts/flexbox-layout/index.ios.js +25 -13
- package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
- package/ui/layouts/grid-layout/index.d.ts +14 -5
- package/ui/layouts/index.d.ts +1 -1
- package/ui/layouts/index.js +1 -1
- package/ui/layouts/index.js.map +1 -1
- package/ui/layouts/layout-base-common.d.ts +2 -2
- package/ui/layouts/layout-base-common.js +11 -8
- package/ui/layouts/layout-base-common.js.map +1 -1
- package/ui/layouts/layout-base.android.d.ts +14 -1
- package/ui/layouts/layout-base.d.ts +15 -1
- package/ui/layouts/layout-base.ios.d.ts +4 -2
- package/ui/layouts/layout-base.ios.js +5 -2
- package/ui/layouts/layout-base.ios.js.map +1 -1
- package/ui/layouts/root-layout/index.android.d.ts +1 -2
- package/ui/layouts/root-layout/index.android.js +42 -31
- package/ui/layouts/root-layout/index.android.js.map +1 -1
- package/ui/layouts/root-layout/index.d.ts +4 -0
- package/ui/layouts/root-layout/index.ios.d.ts +2 -1
- package/ui/layouts/root-layout/index.ios.js +7 -2
- package/ui/layouts/root-layout/index.ios.js.map +1 -1
- package/ui/layouts/root-layout/root-layout-common.d.ts +12 -5
- package/ui/layouts/root-layout/root-layout-common.js +78 -50
- package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
- package/ui/layouts/root-layout/root-layout-stack.d.ts +5 -0
- package/ui/layouts/root-layout/root-layout-stack.js +19 -0
- package/ui/layouts/root-layout/root-layout-stack.js.map +1 -0
- package/ui/layouts/stack-layout/index.android.d.ts +2 -1
- package/ui/layouts/stack-layout/index.d.ts +3 -0
- package/ui/layouts/stack-layout/index.ios.js.map +1 -1
- package/ui/layouts/wrap-layout/index.android.d.ts +5 -1
- package/ui/layouts/wrap-layout/index.d.ts +8 -0
- package/ui/layouts/wrap-layout/wrap-layout-common.js +4 -2
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
- package/ui/list-picker/index.android.d.ts +9 -1
- package/ui/list-picker/index.d.ts +12 -1
- package/ui/list-picker/index.ios.d.ts +9 -1
- package/ui/list-picker/list-picker-common.d.ts +1 -0
- package/ui/list-picker/list-picker-common.js +1 -0
- package/ui/list-picker/list-picker-common.js.map +1 -1
- package/ui/list-view/index.android.d.ts +13 -2
- package/ui/list-view/index.d.ts +24 -0
- package/ui/list-view/index.ios.d.ts +9 -2
- package/ui/list-view/index.ios.js +3 -2
- package/ui/list-view/index.ios.js.map +1 -1
- package/ui/list-view/list-view-common.js +2 -1
- package/ui/list-view/list-view-common.js.map +1 -1
- package/ui/page/index.android.d.ts +13 -1
- package/ui/page/index.d.ts +31 -2
- package/ui/page/index.ios.d.ts +5 -2
- package/ui/page/index.ios.js +69 -100
- package/ui/page/index.ios.js.map +1 -1
- package/ui/placeholder/index.android.d.ts +1 -1
- package/ui/progress/index.android.d.ts +13 -1
- package/ui/progress/index.d.ts +13 -0
- package/ui/progress/index.ios.d.ts +13 -1
- package/ui/proxy-view-container/index.d.ts +2 -0
- package/ui/proxy-view-container/index.js +2 -0
- package/ui/proxy-view-container/index.js.map +1 -1
- package/ui/repeater/index.d.ts +2 -0
- package/ui/repeater/index.js +2 -0
- package/ui/repeater/index.js.map +1 -1
- package/ui/scroll-view/index.android.d.ts +7 -2
- package/ui/scroll-view/index.android.js.map +1 -1
- package/ui/scroll-view/index.d.ts +10 -0
- package/ui/scroll-view/index.ios.d.ts +5 -1
- package/ui/scroll-view/scroll-view-common.d.ts +1 -1
- package/ui/scroll-view/scroll-view-common.js +2 -2
- package/ui/scroll-view/scroll-view-common.js.map +1 -1
- package/ui/search-bar/index.android.d.ts +30 -1
- package/ui/search-bar/index.android.js +7 -1
- package/ui/search-bar/index.android.js.map +1 -1
- package/ui/search-bar/index.d.ts +14 -0
- package/ui/search-bar/index.ios.d.ts +24 -3
- package/ui/search-bar/index.ios.js +16 -15
- package/ui/search-bar/index.ios.js.map +1 -1
- package/ui/search-bar/search-bar-common.js.map +1 -1
- package/ui/segmented-bar/index.android.d.ts +22 -1
- package/ui/segmented-bar/index.d.ts +21 -5
- package/ui/segmented-bar/index.ios.d.ts +14 -1
- package/ui/slider/index.android.d.ts +14 -1
- package/ui/slider/index.d.ts +27 -0
- package/ui/slider/index.ios.d.ts +16 -1
- package/ui/slider/slider-common.d.ts +1 -0
- package/ui/slider/slider-common.js +1 -0
- package/ui/slider/slider-common.js.map +1 -1
- package/ui/styling/background-common.d.ts +3 -3
- package/ui/styling/background-common.js +15 -8
- package/ui/styling/background-common.js.map +1 -1
- package/ui/styling/background.android.js +2 -1
- package/ui/styling/background.android.js.map +1 -1
- package/ui/styling/background.d.ts +11 -8
- package/ui/styling/background.ios.d.ts +1 -15
- package/ui/styling/background.ios.js +75 -72
- package/ui/styling/background.ios.js.map +1 -1
- package/ui/styling/clip-path-function.d.ts +16 -0
- package/ui/styling/clip-path-function.js +25 -0
- package/ui/styling/clip-path-function.js.map +1 -0
- package/ui/styling/css-animation-parser.js +1 -1
- package/ui/styling/css-animation-parser.js.map +1 -1
- package/ui/styling/css-transform.d.ts +2 -0
- package/ui/styling/css-transform.js +110 -0
- package/ui/styling/css-transform.js.map +1 -0
- package/ui/styling/css-utils.js +24 -27
- package/ui/styling/css-utils.js.map +1 -1
- package/ui/styling/font-common.d.ts +2 -0
- package/ui/styling/font-common.js +9 -7
- package/ui/styling/font-common.js.map +1 -1
- package/ui/styling/font-interfaces.d.ts +3 -2
- package/ui/styling/font.android.d.ts +1 -1
- package/ui/styling/font.android.js +83 -21
- package/ui/styling/font.android.js.map +1 -1
- package/ui/styling/font.d.ts +3 -0
- package/ui/styling/font.ios.d.ts +1 -1
- package/ui/styling/font.ios.js +5 -7
- package/ui/styling/font.ios.js.map +1 -1
- package/ui/styling/style/index.d.ts +6 -4
- package/ui/styling/style/index.js +1 -1
- package/ui/styling/style/index.js.map +1 -1
- package/ui/styling/style-properties.d.ts +16 -5
- package/ui/styling/style-properties.js +242 -373
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.js +2 -2
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/switch/index.android.d.ts +13 -1
- package/ui/switch/index.d.ts +11 -0
- package/ui/switch/index.ios.d.ts +13 -2
- package/ui/switch/index.ios.js +1 -13
- package/ui/switch/index.ios.js.map +1 -1
- package/ui/switch/switch-common.js +4 -4
- package/ui/switch/switch-common.js.map +1 -1
- package/ui/tab-view/index.android.d.ts +35 -1
- package/ui/tab-view/index.d.ts +43 -5
- package/ui/tab-view/index.ios.d.ts +24 -1
- package/ui/tab-view/index.ios.js +2 -5
- package/ui/tab-view/index.ios.js.map +1 -1
- package/ui/text-base/index.android.d.ts +57 -3
- package/ui/text-base/index.android.js +85 -51
- package/ui/text-base/index.android.js.map +1 -1
- package/ui/text-base/index.d.ts +82 -7
- package/ui/text-base/index.ios.d.ts +30 -3
- package/ui/text-base/index.ios.js +33 -14
- package/ui/text-base/index.ios.js.map +1 -1
- package/ui/text-base/span.d.ts +3 -1
- package/ui/text-base/span.js +2 -2
- package/ui/text-base/span.js.map +1 -1
- package/ui/text-base/text-base-common.d.ts +6 -4
- package/ui/text-base/text-base-common.js +15 -8
- package/ui/text-base/text-base-common.js.map +1 -1
- package/ui/text-field/index.android.d.ts +4 -1
- package/ui/text-field/index.android.js +0 -7
- package/ui/text-field/index.android.js.map +1 -1
- package/ui/text-field/index.d.ts +13 -0
- package/ui/text-field/index.ios.d.ts +32 -2
- package/ui/text-field/index.ios.js +39 -5
- package/ui/text-field/index.ios.js.map +1 -1
- package/ui/text-field/text-field-common.js.map +1 -1
- package/ui/text-view/index.android.d.ts +1 -0
- package/ui/text-view/index.android.js +1 -0
- package/ui/text-view/index.android.js.map +1 -1
- package/ui/text-view/index.d.ts +22 -0
- package/ui/text-view/index.ios.d.ts +36 -2
- package/ui/text-view/index.ios.js +66 -5
- package/ui/text-view/index.ios.js.map +1 -1
- package/ui/text-view/text-view-common.d.ts +26 -1
- package/ui/text-view/text-view-common.js +34 -0
- package/ui/text-view/text-view-common.js.map +1 -1
- package/ui/time-picker/index.android.d.ts +3 -1
- package/ui/time-picker/index.d.ts +27 -0
- package/ui/time-picker/index.ios.d.ts +21 -1
- package/ui/time-picker/time-picker-common.d.ts +1 -0
- package/ui/time-picker/time-picker-common.js +1 -0
- package/ui/time-picker/time-picker-common.js.map +1 -1
- package/ui/utils.d.ts +1 -1
- package/ui/utils.ios.d.ts +1 -2
- package/ui/utils.ios.js.map +1 -1
- package/ui/web-view/index.android.d.ts +2 -1
- package/ui/web-view/index.d.ts +12 -0
- package/ui/web-view/index.ios.d.ts +2 -1
- package/ui/web-view/web-view-common.d.ts +3 -1
- package/utils/index.android.d.ts +1 -0
- package/utils/index.android.js +16 -0
- package/utils/index.android.js.map +1 -1
- package/utils/index.d.ts +6 -0
- package/utils/index.ios.d.ts +1 -0
- package/utils/index.ios.js +22 -2
- package/utils/index.ios.js.map +1 -1
- package/utils/ios/index.js +4 -4
- package/utils/ios/index.js.map +1 -1
- package/utils/native-helper.ios.js +1 -0
- package/utils/native-helper.ios.js.map +1 -1
- package/wgc/atob.js +1 -1
- package/wgc/btoa.js +1 -1
- package/wgc/crypto/SubtleCrypto.js +8 -8
- package/wgc/crypto/index.d.ts +1 -1
- package/wgc/crypto/index.js +3 -2
- package/wgc/crypto/index.js.map +1 -1
- package/xhr/index.d.ts +3 -3
- package/xml/index.js +1 -1
- package/xml/index.js.map +1 -1
- package/platforms/ios/NSCWinterCG.xcframework/Info.plist +0 -102
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Headers/NSCCrypto.h +0 -79
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Headers/NSString+WinterCG.h +0 -21
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Info.plist +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSCCrypto.h +0 -79
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSString+WinterCG.h +0 -21
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Resources/Info.plist +0 -52
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Headers/NSCCrypto.h +0 -79
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Headers/NSString+WinterCG.h +0 -21
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Resources/Info.plist +0 -52
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/Current/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterCG.yml +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCCrypto.h +0 -79
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSString+WinterCG.h +0 -21
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Info.plist +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/_CodeSignature/CodeResources +0 -146
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterCG.yml +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Headers/NSCCrypto.h +0 -79
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Headers/NSString+WinterCG.h +0 -21
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Info.plist +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCCrypto.h +0 -79
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSString+WinterCG.h +0 -21
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Info.plist +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/_CodeSignature/CodeResources +0 -146
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterCG.yml +0 -40
|
@@ -1,50 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
import { unsetValue, CssProperty, CssAnimationProperty, ShorthandProperty, InheritedCssProperty } from '../core/properties';
|
|
1
|
+
import { unsetValue, CssProperty, CssAnimationProperty, ShorthandProperty, InheritedCssProperty, isCssWideKeyword } from '../core/properties';
|
|
3
2
|
import { Style } from './style';
|
|
4
3
|
import { Color } from '../../color';
|
|
5
4
|
import { Font, parseFont, FontStyle, FontWeight, FontVariationSettings } from './font';
|
|
6
5
|
import { Background } from './background';
|
|
7
|
-
import { layout
|
|
8
|
-
import { radiansToDegrees } from '../../utils/number-utils';
|
|
9
|
-
import { decompose2DTransformMatrix, getTransformMatrix, matrixArrayToCssMatrix, multiplyAffine2d } from '../../matrix';
|
|
6
|
+
import { layout } from '../../utils';
|
|
10
7
|
import { Trace } from '../../trace';
|
|
11
8
|
import { CoreTypes } from '../../core-types';
|
|
12
9
|
import { parseBackground } from '../../css/parser';
|
|
13
10
|
import { LinearGradient } from './linear-gradient';
|
|
14
11
|
import { parseCSSShadow } from './css-shadow';
|
|
12
|
+
import { transformConverter } from './css-transform';
|
|
13
|
+
import { ClipPathFunction } from './clip-path-function';
|
|
15
14
|
function equalsCommon(a, b) {
|
|
16
|
-
if (a == 'auto') {
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
if (a == 'auto' || isCssWideKeyword(a)) {
|
|
16
|
+
return b == 'auto' || isCssWideKeyword(b);
|
|
17
|
+
}
|
|
18
|
+
if (b == 'auto' || isCssWideKeyword(b)) {
|
|
19
|
+
return false;
|
|
19
20
|
}
|
|
20
21
|
if (typeof a === 'number') {
|
|
21
|
-
if (b == 'auto') {
|
|
22
|
-
// tslint:disable-line
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
22
|
if (typeof b === 'number') {
|
|
26
|
-
return a == b;
|
|
23
|
+
return a == b;
|
|
27
24
|
}
|
|
28
25
|
if (!b) {
|
|
29
26
|
return false;
|
|
30
27
|
}
|
|
31
|
-
return b.unit == 'dip' && a == b.value;
|
|
32
|
-
}
|
|
33
|
-
if (b == 'auto') {
|
|
34
|
-
// tslint:disable-line
|
|
35
|
-
return false;
|
|
28
|
+
return b.unit == 'dip' && a == b.value;
|
|
36
29
|
}
|
|
37
30
|
if (typeof b === 'number') {
|
|
38
|
-
return a ? a.unit == 'dip' && a.value == b : false;
|
|
31
|
+
return a ? a.unit == 'dip' && a.value == b : false;
|
|
39
32
|
}
|
|
40
33
|
if (!a || !b) {
|
|
41
34
|
return false;
|
|
42
35
|
}
|
|
43
|
-
return a.value == b.value && a.unit == b.unit;
|
|
36
|
+
return a.value == b.value && a.unit == b.unit;
|
|
44
37
|
}
|
|
45
38
|
function convertToStringCommon(length) {
|
|
46
|
-
if (length == 'auto' || length === null || length === undefined) {
|
|
47
|
-
// tslint:disable-line
|
|
39
|
+
if (length == 'auto' || length === null || length === undefined || isCssWideKeyword(length)) {
|
|
48
40
|
return 'auto';
|
|
49
41
|
}
|
|
50
42
|
if (typeof length === 'number') {
|
|
@@ -57,7 +49,7 @@ function convertToStringCommon(length) {
|
|
|
57
49
|
return val + length.unit;
|
|
58
50
|
}
|
|
59
51
|
function toDevicePixelsCommon(length, auto = Number.NaN, parentAvailableWidth = Number.NaN) {
|
|
60
|
-
if (length
|
|
52
|
+
if (length == 'auto' || length === null || length === undefined || isCssWideKeyword(length)) {
|
|
61
53
|
return auto;
|
|
62
54
|
}
|
|
63
55
|
if (typeof length === 'number') {
|
|
@@ -83,11 +75,10 @@ export var PercentLength;
|
|
|
83
75
|
(function (PercentLength) {
|
|
84
76
|
function parse(fromValue) {
|
|
85
77
|
if (fromValue == 'auto') {
|
|
86
|
-
// tslint:disable-line
|
|
87
78
|
return 'auto';
|
|
88
79
|
}
|
|
89
80
|
if (typeof fromValue === 'string') {
|
|
90
|
-
|
|
81
|
+
const stringValue = fromValue.trim();
|
|
91
82
|
if (stringValue.endsWith('%')) {
|
|
92
83
|
// Normalize result to values between -1 and 1
|
|
93
84
|
const value = parseFloat(stringValue.substring(0, stringValue.length - 1).trim()) / 100;
|
|
@@ -120,13 +111,10 @@ export var PercentLength;
|
|
|
120
111
|
PercentLength.toDevicePixels = toDevicePixelsCommon;
|
|
121
112
|
PercentLength.convertToString = convertToStringCommon;
|
|
122
113
|
})(PercentLength || (PercentLength = {}));
|
|
123
|
-
export var
|
|
124
|
-
(function (
|
|
114
|
+
export var FixedLength;
|
|
115
|
+
(function (FixedLength) {
|
|
125
116
|
function parse(fromValue) {
|
|
126
117
|
if (typeof fromValue === 'string') {
|
|
127
|
-
if (fromValue === 'auto') {
|
|
128
|
-
return 'auto';
|
|
129
|
-
}
|
|
130
118
|
let stringValue = fromValue.trim();
|
|
131
119
|
if (stringValue.endsWith('px')) {
|
|
132
120
|
stringValue = stringValue.slice(0, -2).trim();
|
|
@@ -148,11 +136,188 @@ export var Length;
|
|
|
148
136
|
return fromValue;
|
|
149
137
|
}
|
|
150
138
|
}
|
|
139
|
+
FixedLength.parse = parse;
|
|
140
|
+
FixedLength.equals = equalsCommon;
|
|
141
|
+
FixedLength.toDevicePixels = toDevicePixelsCommon;
|
|
142
|
+
FixedLength.convertToString = convertToStringCommon;
|
|
143
|
+
})(FixedLength || (FixedLength = {}));
|
|
144
|
+
export var Length;
|
|
145
|
+
(function (Length) {
|
|
146
|
+
function parse(fromValue) {
|
|
147
|
+
if (fromValue == 'auto') {
|
|
148
|
+
return 'auto';
|
|
149
|
+
}
|
|
150
|
+
return FixedLength.parse(fromValue);
|
|
151
|
+
}
|
|
151
152
|
Length.parse = parse;
|
|
152
153
|
Length.equals = equalsCommon;
|
|
153
154
|
Length.toDevicePixels = toDevicePixelsCommon;
|
|
154
155
|
Length.convertToString = convertToStringCommon;
|
|
155
156
|
})(Length || (Length = {}));
|
|
157
|
+
function isNonNegativeFiniteNumber(value) {
|
|
158
|
+
return isFinite(value) && !isNaN(value) && value >= 0;
|
|
159
|
+
}
|
|
160
|
+
function parseClipPath(value) {
|
|
161
|
+
const funcStartIndex = value.indexOf('(');
|
|
162
|
+
const funcEndIndex = value.lastIndexOf(')');
|
|
163
|
+
if (funcStartIndex > -1 && funcEndIndex > -1) {
|
|
164
|
+
const functionName = value.substring(0, funcStartIndex).trim();
|
|
165
|
+
switch (functionName) {
|
|
166
|
+
case 'rect':
|
|
167
|
+
case 'circle':
|
|
168
|
+
case 'ellipse':
|
|
169
|
+
case 'polygon':
|
|
170
|
+
case 'inset': {
|
|
171
|
+
return new ClipPathFunction(functionName, value.substring(funcStartIndex + 1, funcEndIndex));
|
|
172
|
+
}
|
|
173
|
+
default:
|
|
174
|
+
throw new Error(`Clip-path function ${functionName} is not valid.`);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
if (value === 'none') {
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
// Only shape functions and none are supported for now
|
|
182
|
+
throw new Error(`Clip-path value ${value} is not valid.`);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
function parseShorthandPositioning(value) {
|
|
186
|
+
const arr = value.split(/[ ,]+/);
|
|
187
|
+
let top;
|
|
188
|
+
let right;
|
|
189
|
+
let bottom;
|
|
190
|
+
let left;
|
|
191
|
+
if (arr.length === 1) {
|
|
192
|
+
top = arr[0];
|
|
193
|
+
right = arr[0];
|
|
194
|
+
bottom = arr[0];
|
|
195
|
+
left = arr[0];
|
|
196
|
+
}
|
|
197
|
+
else if (arr.length === 2) {
|
|
198
|
+
top = arr[0];
|
|
199
|
+
bottom = arr[0];
|
|
200
|
+
right = arr[1];
|
|
201
|
+
left = arr[1];
|
|
202
|
+
}
|
|
203
|
+
else if (arr.length === 3) {
|
|
204
|
+
top = arr[0];
|
|
205
|
+
right = arr[1];
|
|
206
|
+
left = arr[1];
|
|
207
|
+
bottom = arr[2];
|
|
208
|
+
}
|
|
209
|
+
else if (arr.length === 4) {
|
|
210
|
+
top = arr[0];
|
|
211
|
+
right = arr[1];
|
|
212
|
+
bottom = arr[2];
|
|
213
|
+
left = arr[3];
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
throw new Error('Expected 1, 2, 3 or 4 parameters. Actual: ' + value);
|
|
217
|
+
}
|
|
218
|
+
return {
|
|
219
|
+
top: top,
|
|
220
|
+
right: right,
|
|
221
|
+
bottom: bottom,
|
|
222
|
+
left: left,
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
function parseBorderColorPositioning(value) {
|
|
226
|
+
if (value.indexOf('rgb') === 0 || value.indexOf('hsl') === 0) {
|
|
227
|
+
return {
|
|
228
|
+
top: value,
|
|
229
|
+
right: value,
|
|
230
|
+
bottom: value,
|
|
231
|
+
left: value,
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
return parseShorthandPositioning(value);
|
|
235
|
+
}
|
|
236
|
+
function convertToBackgrounds(value) {
|
|
237
|
+
if (typeof value === 'string') {
|
|
238
|
+
const backgrounds = parseBackground(value).value;
|
|
239
|
+
let backgroundColor = unsetValue;
|
|
240
|
+
if (backgrounds.color) {
|
|
241
|
+
backgroundColor = backgrounds.color instanceof Color ? backgrounds.color : new Color(backgrounds.color);
|
|
242
|
+
}
|
|
243
|
+
let backgroundImage;
|
|
244
|
+
if (typeof backgrounds.image === 'object' && backgrounds.image) {
|
|
245
|
+
backgroundImage = LinearGradient.parse(backgrounds.image);
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
backgroundImage = backgrounds.image || unsetValue;
|
|
249
|
+
}
|
|
250
|
+
const backgroundRepeat = backgrounds.repeat || unsetValue;
|
|
251
|
+
const backgroundPosition = backgrounds.position ? backgrounds.position.text : unsetValue;
|
|
252
|
+
return [
|
|
253
|
+
[backgroundColorProperty, backgroundColor],
|
|
254
|
+
[backgroundImageProperty, backgroundImage],
|
|
255
|
+
[backgroundRepeatProperty, backgroundRepeat],
|
|
256
|
+
[backgroundPositionProperty, backgroundPosition],
|
|
257
|
+
];
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
return [
|
|
261
|
+
[backgroundColorProperty, unsetValue],
|
|
262
|
+
[backgroundImageProperty, unsetValue],
|
|
263
|
+
[backgroundRepeatProperty, unsetValue],
|
|
264
|
+
[backgroundPositionProperty, unsetValue],
|
|
265
|
+
];
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
function convertToMargins(value) {
|
|
269
|
+
if (typeof value === 'string' && value !== 'auto') {
|
|
270
|
+
const thickness = parseShorthandPositioning(value);
|
|
271
|
+
return [
|
|
272
|
+
[marginTopProperty, PercentLength.parse(thickness.top)],
|
|
273
|
+
[marginRightProperty, PercentLength.parse(thickness.right)],
|
|
274
|
+
[marginBottomProperty, PercentLength.parse(thickness.bottom)],
|
|
275
|
+
[marginLeftProperty, PercentLength.parse(thickness.left)],
|
|
276
|
+
];
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
return [
|
|
280
|
+
[marginTopProperty, value],
|
|
281
|
+
[marginRightProperty, value],
|
|
282
|
+
[marginBottomProperty, value],
|
|
283
|
+
[marginLeftProperty, value],
|
|
284
|
+
];
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
function convertToPaddings(value) {
|
|
288
|
+
if (typeof value === 'string' && value !== 'auto') {
|
|
289
|
+
const thickness = parseShorthandPositioning(value);
|
|
290
|
+
return [
|
|
291
|
+
[paddingTopProperty, Length.parse(thickness.top)],
|
|
292
|
+
[paddingRightProperty, Length.parse(thickness.right)],
|
|
293
|
+
[paddingBottomProperty, Length.parse(thickness.bottom)],
|
|
294
|
+
[paddingLeftProperty, Length.parse(thickness.left)],
|
|
295
|
+
];
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
return [
|
|
299
|
+
[paddingTopProperty, value],
|
|
300
|
+
[paddingRightProperty, value],
|
|
301
|
+
[paddingBottomProperty, value],
|
|
302
|
+
[paddingLeftProperty, value],
|
|
303
|
+
];
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
function convertToTransform(value) {
|
|
307
|
+
if (value === unsetValue) {
|
|
308
|
+
value = 'none';
|
|
309
|
+
}
|
|
310
|
+
const { translate, rotate, scale } = transformConverter(value);
|
|
311
|
+
return [
|
|
312
|
+
[translateXProperty, translate.x],
|
|
313
|
+
[translateYProperty, translate.y],
|
|
314
|
+
[scaleXProperty, scale.x],
|
|
315
|
+
[scaleYProperty, scale.y],
|
|
316
|
+
[rotateProperty, rotate.z],
|
|
317
|
+
[rotateXProperty, rotate.x],
|
|
318
|
+
[rotateYProperty, rotate.y],
|
|
319
|
+
];
|
|
320
|
+
}
|
|
156
321
|
export const minWidthProperty = new CssProperty({
|
|
157
322
|
name: 'minWidth',
|
|
158
323
|
cssName: 'min-width',
|
|
@@ -355,89 +520,6 @@ export const verticalAlignmentProperty = new CssProperty({
|
|
|
355
520
|
valueConverter: CoreTypes.VerticalAlignment.parse,
|
|
356
521
|
});
|
|
357
522
|
verticalAlignmentProperty.register(Style);
|
|
358
|
-
function parseThickness(value) {
|
|
359
|
-
if (typeof value === 'string') {
|
|
360
|
-
const arr = value.split(' ');
|
|
361
|
-
let top;
|
|
362
|
-
let right;
|
|
363
|
-
let bottom;
|
|
364
|
-
let left;
|
|
365
|
-
if (arr.length === 1) {
|
|
366
|
-
top = arr[0];
|
|
367
|
-
right = arr[0];
|
|
368
|
-
bottom = arr[0];
|
|
369
|
-
left = arr[0];
|
|
370
|
-
}
|
|
371
|
-
else if (arr.length === 2) {
|
|
372
|
-
top = arr[0];
|
|
373
|
-
bottom = arr[0];
|
|
374
|
-
right = arr[1];
|
|
375
|
-
left = arr[1];
|
|
376
|
-
}
|
|
377
|
-
else if (arr.length === 3) {
|
|
378
|
-
top = arr[0];
|
|
379
|
-
right = arr[1];
|
|
380
|
-
left = arr[1];
|
|
381
|
-
bottom = arr[2];
|
|
382
|
-
}
|
|
383
|
-
else if (arr.length === 4) {
|
|
384
|
-
top = arr[0];
|
|
385
|
-
right = arr[1];
|
|
386
|
-
bottom = arr[2];
|
|
387
|
-
left = arr[3];
|
|
388
|
-
}
|
|
389
|
-
else {
|
|
390
|
-
throw new Error('Expected 1, 2, 3 or 4 parameters. Actual: ' + value);
|
|
391
|
-
}
|
|
392
|
-
return {
|
|
393
|
-
top: top,
|
|
394
|
-
right: right,
|
|
395
|
-
bottom: bottom,
|
|
396
|
-
left: left,
|
|
397
|
-
};
|
|
398
|
-
}
|
|
399
|
-
else {
|
|
400
|
-
return value;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
function convertToMargins(value) {
|
|
404
|
-
if (typeof value === 'string' && value !== 'auto') {
|
|
405
|
-
const thickness = parseThickness(value);
|
|
406
|
-
return [
|
|
407
|
-
[marginTopProperty, PercentLength.parse(thickness.top)],
|
|
408
|
-
[marginRightProperty, PercentLength.parse(thickness.right)],
|
|
409
|
-
[marginBottomProperty, PercentLength.parse(thickness.bottom)],
|
|
410
|
-
[marginLeftProperty, PercentLength.parse(thickness.left)],
|
|
411
|
-
];
|
|
412
|
-
}
|
|
413
|
-
else {
|
|
414
|
-
return [
|
|
415
|
-
[marginTopProperty, value],
|
|
416
|
-
[marginRightProperty, value],
|
|
417
|
-
[marginBottomProperty, value],
|
|
418
|
-
[marginLeftProperty, value],
|
|
419
|
-
];
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
function convertToPaddings(value) {
|
|
423
|
-
if (typeof value === 'string' && value !== 'auto') {
|
|
424
|
-
const thickness = parseThickness(value);
|
|
425
|
-
return [
|
|
426
|
-
[paddingTopProperty, Length.parse(thickness.top)],
|
|
427
|
-
[paddingRightProperty, Length.parse(thickness.right)],
|
|
428
|
-
[paddingBottomProperty, Length.parse(thickness.bottom)],
|
|
429
|
-
[paddingLeftProperty, Length.parse(thickness.left)],
|
|
430
|
-
];
|
|
431
|
-
}
|
|
432
|
-
else {
|
|
433
|
-
return [
|
|
434
|
-
[paddingTopProperty, value],
|
|
435
|
-
[paddingRightProperty, value],
|
|
436
|
-
[paddingBottomProperty, value],
|
|
437
|
-
[paddingLeftProperty, value],
|
|
438
|
-
];
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
523
|
export const rotateProperty = new CssAnimationProperty({
|
|
442
524
|
name: 'rotate',
|
|
443
525
|
cssName: 'rotate',
|
|
@@ -480,26 +562,20 @@ export const scaleYProperty = new CssAnimationProperty({
|
|
|
480
562
|
valueConverter: parseFloat,
|
|
481
563
|
});
|
|
482
564
|
scaleYProperty.register(Style);
|
|
483
|
-
function parseDIPs(value) {
|
|
484
|
-
if (value.endsWith('px')) {
|
|
485
|
-
return layout.toDeviceIndependentPixels(parseFloat(value.trim().slice(-2).trim()));
|
|
486
|
-
}
|
|
487
|
-
else {
|
|
488
|
-
return parseFloat(value.slice(-3).trim());
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
565
|
export const translateXProperty = new CssAnimationProperty({
|
|
492
566
|
name: 'translateX',
|
|
493
567
|
cssName: 'translateX',
|
|
494
568
|
defaultValue: 0,
|
|
495
|
-
|
|
569
|
+
equalityComparer: FixedLength.equals,
|
|
570
|
+
valueConverter: FixedLength.parse,
|
|
496
571
|
});
|
|
497
572
|
translateXProperty.register(Style);
|
|
498
573
|
export const translateYProperty = new CssAnimationProperty({
|
|
499
574
|
name: 'translateY',
|
|
500
575
|
cssName: 'translateY',
|
|
501
576
|
defaultValue: 0,
|
|
502
|
-
|
|
577
|
+
equalityComparer: FixedLength.equals,
|
|
578
|
+
valueConverter: FixedLength.parse,
|
|
503
579
|
});
|
|
504
580
|
translateYProperty.register(Style);
|
|
505
581
|
const transformProperty = new ShorthandProperty({
|
|
@@ -529,125 +605,6 @@ const transformProperty = new ShorthandProperty({
|
|
|
529
605
|
converter: convertToTransform,
|
|
530
606
|
});
|
|
531
607
|
transformProperty.register(Style);
|
|
532
|
-
const IDENTITY_TRANSFORMATION = {
|
|
533
|
-
translate: { x: 0, y: 0 },
|
|
534
|
-
rotate: { x: 0, y: 0, z: 0 },
|
|
535
|
-
scale: { x: 1, y: 1 },
|
|
536
|
-
};
|
|
537
|
-
const TRANSFORM_SPLITTER = new RegExp(/\s*(.+?)\((.*?)\)/g);
|
|
538
|
-
const TRANSFORMATIONS = Object.freeze(['rotate', 'rotateX', 'rotateY', 'rotate3d', 'translate', 'translate3d', 'translateX', 'translateY', 'scale', 'scale3d', 'scaleX', 'scaleY']);
|
|
539
|
-
const STYLE_TRANSFORMATION_MAP = Object.freeze({
|
|
540
|
-
scale: (value) => ({ property: 'scale', value }),
|
|
541
|
-
scale3d: (value) => ({ property: 'scale', value }),
|
|
542
|
-
scaleX: ({ x }) => ({
|
|
543
|
-
property: 'scale',
|
|
544
|
-
value: { x, y: IDENTITY_TRANSFORMATION.scale.y },
|
|
545
|
-
}),
|
|
546
|
-
scaleY: ({ y }) => ({
|
|
547
|
-
property: 'scale',
|
|
548
|
-
value: { y, x: IDENTITY_TRANSFORMATION.scale.x },
|
|
549
|
-
}),
|
|
550
|
-
translate: (value) => ({ property: 'translate', value }),
|
|
551
|
-
translate3d: (value) => ({ property: 'translate', value }),
|
|
552
|
-
translateX: ({ x }) => ({
|
|
553
|
-
property: 'translate',
|
|
554
|
-
value: { x, y: IDENTITY_TRANSFORMATION.translate.y },
|
|
555
|
-
}),
|
|
556
|
-
translateY: ({ y }) => ({
|
|
557
|
-
property: 'translate',
|
|
558
|
-
value: { y, x: IDENTITY_TRANSFORMATION.translate.x },
|
|
559
|
-
}),
|
|
560
|
-
rotate3d: (value) => ({ property: 'rotate', value }),
|
|
561
|
-
rotateX: (x) => ({
|
|
562
|
-
property: 'rotate',
|
|
563
|
-
value: {
|
|
564
|
-
x,
|
|
565
|
-
y: IDENTITY_TRANSFORMATION.rotate.y,
|
|
566
|
-
z: IDENTITY_TRANSFORMATION.rotate.z,
|
|
567
|
-
},
|
|
568
|
-
}),
|
|
569
|
-
rotateY: (y) => ({
|
|
570
|
-
property: 'rotate',
|
|
571
|
-
value: {
|
|
572
|
-
x: IDENTITY_TRANSFORMATION.rotate.x,
|
|
573
|
-
y,
|
|
574
|
-
z: IDENTITY_TRANSFORMATION.rotate.z,
|
|
575
|
-
},
|
|
576
|
-
}),
|
|
577
|
-
rotate: (z) => ({
|
|
578
|
-
property: 'rotate',
|
|
579
|
-
value: {
|
|
580
|
-
x: IDENTITY_TRANSFORMATION.rotate.x,
|
|
581
|
-
y: IDENTITY_TRANSFORMATION.rotate.y,
|
|
582
|
-
z,
|
|
583
|
-
},
|
|
584
|
-
}),
|
|
585
|
-
});
|
|
586
|
-
function convertToTransform(value) {
|
|
587
|
-
if (value === unsetValue) {
|
|
588
|
-
value = 'none';
|
|
589
|
-
}
|
|
590
|
-
const { translate, rotate, scale } = transformConverter(value);
|
|
591
|
-
return [
|
|
592
|
-
[translateXProperty, translate.x],
|
|
593
|
-
[translateYProperty, translate.y],
|
|
594
|
-
[scaleXProperty, scale.x],
|
|
595
|
-
[scaleYProperty, scale.y],
|
|
596
|
-
[rotateProperty, rotate.z],
|
|
597
|
-
[rotateXProperty, rotate.x],
|
|
598
|
-
[rotateYProperty, rotate.y],
|
|
599
|
-
];
|
|
600
|
-
}
|
|
601
|
-
export function transformConverter(text) {
|
|
602
|
-
const transformations = parseTransformString(text);
|
|
603
|
-
if (text === 'none' || text === '' || !transformations.length) {
|
|
604
|
-
return IDENTITY_TRANSFORMATION;
|
|
605
|
-
}
|
|
606
|
-
const usedTransforms = transformations.map((t) => t.property);
|
|
607
|
-
if (!hasDuplicates(usedTransforms)) {
|
|
608
|
-
const fullTransformations = { ...IDENTITY_TRANSFORMATION };
|
|
609
|
-
transformations.forEach((transform) => {
|
|
610
|
-
fullTransformations[transform.property] = transform.value;
|
|
611
|
-
});
|
|
612
|
-
return fullTransformations;
|
|
613
|
-
}
|
|
614
|
-
const affineMatrix = transformations.map(getTransformMatrix).reduce(multiplyAffine2d);
|
|
615
|
-
const cssMatrix = matrixArrayToCssMatrix(affineMatrix);
|
|
616
|
-
return decompose2DTransformMatrix(cssMatrix);
|
|
617
|
-
}
|
|
618
|
-
// using general regex and manually checking the matched
|
|
619
|
-
// properties is faster than using more specific regex
|
|
620
|
-
// https://jsperf.com/cssparse
|
|
621
|
-
function parseTransformString(text) {
|
|
622
|
-
const matches = [];
|
|
623
|
-
let match;
|
|
624
|
-
while ((match = TRANSFORM_SPLITTER.exec(text)) !== null) {
|
|
625
|
-
const property = match[1];
|
|
626
|
-
const value = convertTransformValue(property, match[2]);
|
|
627
|
-
if (TRANSFORMATIONS.indexOf(property) !== -1) {
|
|
628
|
-
matches.push(normalizeTransformation({ property, value }));
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
return matches;
|
|
632
|
-
}
|
|
633
|
-
function normalizeTransformation({ property, value }) {
|
|
634
|
-
return STYLE_TRANSFORMATION_MAP[property](value);
|
|
635
|
-
}
|
|
636
|
-
function convertTransformValue(property, stringValue) {
|
|
637
|
-
// eslint-disable-next-line prefer-const
|
|
638
|
-
let [x, y, z] = stringValue.split(',').map(parseFloat);
|
|
639
|
-
if (property === 'translate') {
|
|
640
|
-
y ?? (y = IDENTITY_TRANSFORMATION.translate.y);
|
|
641
|
-
}
|
|
642
|
-
else {
|
|
643
|
-
y ?? (y = x);
|
|
644
|
-
z ?? (z = y);
|
|
645
|
-
}
|
|
646
|
-
if (property === 'rotate' || property === 'rotateX' || property === 'rotateY') {
|
|
647
|
-
return stringValue.slice(-3) === 'rad' ? radiansToDegrees(x) : x;
|
|
648
|
-
}
|
|
649
|
-
return { x, y, z };
|
|
650
|
-
}
|
|
651
608
|
// Background properties.
|
|
652
609
|
const backgroundProperty = new ShorthandProperty({
|
|
653
610
|
name: 'background',
|
|
@@ -689,7 +646,6 @@ function backgroundInternalSubPropertyValueChanged(block) {
|
|
|
689
646
|
}
|
|
690
647
|
};
|
|
691
648
|
}
|
|
692
|
-
// const pattern: RegExp = /url\(('|")(.*?)\1\)/;
|
|
693
649
|
export const backgroundImageProperty = new CssProperty({
|
|
694
650
|
name: 'backgroundImage',
|
|
695
651
|
cssName: 'background-image',
|
|
@@ -740,89 +696,6 @@ export const backgroundPositionProperty = new CssProperty({
|
|
|
740
696
|
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => target.backgroundInternal.withPosition(newValue)),
|
|
741
697
|
});
|
|
742
698
|
backgroundPositionProperty.register(Style);
|
|
743
|
-
function convertToBackgrounds(value) {
|
|
744
|
-
if (typeof value === 'string') {
|
|
745
|
-
const backgrounds = parseBackground(value).value;
|
|
746
|
-
let backgroundColor = unsetValue;
|
|
747
|
-
if (backgrounds.color) {
|
|
748
|
-
backgroundColor = backgrounds.color instanceof Color ? backgrounds.color : new Color(backgrounds.color);
|
|
749
|
-
}
|
|
750
|
-
let backgroundImage;
|
|
751
|
-
if (typeof backgrounds.image === 'object' && backgrounds.image) {
|
|
752
|
-
backgroundImage = LinearGradient.parse(backgrounds.image);
|
|
753
|
-
}
|
|
754
|
-
else {
|
|
755
|
-
backgroundImage = backgrounds.image || unsetValue;
|
|
756
|
-
}
|
|
757
|
-
const backgroundRepeat = backgrounds.repeat || unsetValue;
|
|
758
|
-
const backgroundPosition = backgrounds.position ? backgrounds.position.text : unsetValue;
|
|
759
|
-
return [
|
|
760
|
-
[backgroundColorProperty, backgroundColor],
|
|
761
|
-
[backgroundImageProperty, backgroundImage],
|
|
762
|
-
[backgroundRepeatProperty, backgroundRepeat],
|
|
763
|
-
[backgroundPositionProperty, backgroundPosition],
|
|
764
|
-
];
|
|
765
|
-
}
|
|
766
|
-
else {
|
|
767
|
-
return [
|
|
768
|
-
[backgroundColorProperty, unsetValue],
|
|
769
|
-
[backgroundImageProperty, unsetValue],
|
|
770
|
-
[backgroundRepeatProperty, unsetValue],
|
|
771
|
-
[backgroundPositionProperty, unsetValue],
|
|
772
|
-
];
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
function parseBorderColor(value) {
|
|
776
|
-
const result = {
|
|
777
|
-
top: undefined,
|
|
778
|
-
right: undefined,
|
|
779
|
-
bottom: undefined,
|
|
780
|
-
left: undefined,
|
|
781
|
-
};
|
|
782
|
-
if (value.indexOf('rgb') === 0 || value.indexOf('hsl') === 0) {
|
|
783
|
-
result.top = result.right = result.bottom = result.left = new Color(value);
|
|
784
|
-
return result;
|
|
785
|
-
}
|
|
786
|
-
const arr = value.split(/[ ,]+/);
|
|
787
|
-
if (arr.length === 1) {
|
|
788
|
-
const arr0 = new Color(arr[0]);
|
|
789
|
-
result.top = arr0;
|
|
790
|
-
result.right = arr0;
|
|
791
|
-
result.bottom = arr0;
|
|
792
|
-
result.left = arr0;
|
|
793
|
-
}
|
|
794
|
-
else if (arr.length === 2) {
|
|
795
|
-
const arr0 = new Color(arr[0]);
|
|
796
|
-
const arr1 = new Color(arr[1]);
|
|
797
|
-
result.top = arr0;
|
|
798
|
-
result.right = arr1;
|
|
799
|
-
result.bottom = arr0;
|
|
800
|
-
result.left = arr1;
|
|
801
|
-
}
|
|
802
|
-
else if (arr.length === 3) {
|
|
803
|
-
const arr0 = new Color(arr[0]);
|
|
804
|
-
const arr1 = new Color(arr[1]);
|
|
805
|
-
const arr2 = new Color(arr[2]);
|
|
806
|
-
result.top = arr0;
|
|
807
|
-
result.right = arr1;
|
|
808
|
-
result.bottom = arr2;
|
|
809
|
-
result.left = arr1;
|
|
810
|
-
}
|
|
811
|
-
else if (arr.length === 4) {
|
|
812
|
-
const arr0 = new Color(arr[0]);
|
|
813
|
-
const arr1 = new Color(arr[1]);
|
|
814
|
-
const arr2 = new Color(arr[2]);
|
|
815
|
-
const arr3 = new Color(arr[3]);
|
|
816
|
-
result.top = arr0;
|
|
817
|
-
result.right = arr1;
|
|
818
|
-
result.bottom = arr2;
|
|
819
|
-
result.left = arr3;
|
|
820
|
-
}
|
|
821
|
-
else {
|
|
822
|
-
throw new Error(`Expected 1, 2, 3 or 4 parameters. Actual: ${value}`);
|
|
823
|
-
}
|
|
824
|
-
return result;
|
|
825
|
-
}
|
|
826
699
|
// Border Color properties.
|
|
827
700
|
const borderColorProperty = new ShorthandProperty({
|
|
828
701
|
name: 'borderColor',
|
|
@@ -837,12 +710,12 @@ const borderColorProperty = new ShorthandProperty({
|
|
|
837
710
|
},
|
|
838
711
|
converter: function (value) {
|
|
839
712
|
if (typeof value === 'string') {
|
|
840
|
-
const
|
|
713
|
+
const colors = parseBorderColorPositioning(value);
|
|
841
714
|
return [
|
|
842
|
-
[borderTopColorProperty,
|
|
843
|
-
[borderRightColorProperty,
|
|
844
|
-
[borderBottomColorProperty,
|
|
845
|
-
[borderLeftColorProperty,
|
|
715
|
+
[borderTopColorProperty, new Color(colors.top)],
|
|
716
|
+
[borderRightColorProperty, new Color(colors.right)],
|
|
717
|
+
[borderBottomColorProperty, new Color(colors.bottom)],
|
|
718
|
+
[borderLeftColorProperty, new Color(colors.left)],
|
|
846
719
|
];
|
|
847
720
|
}
|
|
848
721
|
else {
|
|
@@ -902,12 +775,12 @@ const borderWidthProperty = new ShorthandProperty({
|
|
|
902
775
|
},
|
|
903
776
|
converter: function (value) {
|
|
904
777
|
if (typeof value === 'string' && value !== 'auto') {
|
|
905
|
-
const borderWidths =
|
|
778
|
+
const borderWidths = parseShorthandPositioning(value);
|
|
906
779
|
return [
|
|
907
|
-
[borderTopWidthProperty, borderWidths.top],
|
|
908
|
-
[borderRightWidthProperty, borderWidths.right],
|
|
909
|
-
[borderBottomWidthProperty, borderWidths.bottom],
|
|
910
|
-
[borderLeftWidthProperty, borderWidths.left],
|
|
780
|
+
[borderTopWidthProperty, Length.parse(borderWidths.top)],
|
|
781
|
+
[borderRightWidthProperty, Length.parse(borderWidths.right)],
|
|
782
|
+
[borderBottomWidthProperty, Length.parse(borderWidths.bottom)],
|
|
783
|
+
[borderLeftWidthProperty, Length.parse(borderWidths.left)],
|
|
911
784
|
];
|
|
912
785
|
}
|
|
913
786
|
else {
|
|
@@ -1025,12 +898,12 @@ const borderRadiusProperty = new ShorthandProperty({
|
|
|
1025
898
|
},
|
|
1026
899
|
converter: function (value) {
|
|
1027
900
|
if (typeof value === 'string') {
|
|
1028
|
-
const borderRadius =
|
|
901
|
+
const borderRadius = parseShorthandPositioning(value);
|
|
1029
902
|
return [
|
|
1030
|
-
[borderTopLeftRadiusProperty, borderRadius.top],
|
|
1031
|
-
[borderTopRightRadiusProperty, borderRadius.right],
|
|
1032
|
-
[borderBottomRightRadiusProperty, borderRadius.bottom],
|
|
1033
|
-
[borderBottomLeftRadiusProperty, borderRadius.left],
|
|
903
|
+
[borderTopLeftRadiusProperty, Length.parse(borderRadius.top)],
|
|
904
|
+
[borderTopRightRadiusProperty, Length.parse(borderRadius.right)],
|
|
905
|
+
[borderBottomRightRadiusProperty, Length.parse(borderRadius.bottom)],
|
|
906
|
+
[borderBottomLeftRadiusProperty, Length.parse(borderRadius.left)],
|
|
1034
907
|
];
|
|
1035
908
|
}
|
|
1036
909
|
else {
|
|
@@ -1128,53 +1001,49 @@ const boxShadowProperty = new CssProperty({
|
|
|
1128
1001
|
},
|
|
1129
1002
|
});
|
|
1130
1003
|
boxShadowProperty.register(Style);
|
|
1131
|
-
function isNonNegativeFiniteNumber(value) {
|
|
1132
|
-
return isFinite(value) && value >= 0;
|
|
1133
|
-
}
|
|
1134
|
-
const supportedPaths = ['rect', 'circle', 'ellipse', 'polygon', 'inset'];
|
|
1135
|
-
function isClipPathValid(value) {
|
|
1136
|
-
if (!value) {
|
|
1137
|
-
return true;
|
|
1138
|
-
}
|
|
1139
|
-
const functionName = value.substring(0, value.indexOf('(')).trim();
|
|
1140
|
-
return supportedPaths.indexOf(functionName) !== -1;
|
|
1141
|
-
}
|
|
1142
1004
|
export const clipPathProperty = new CssProperty({
|
|
1143
1005
|
name: 'clipPath',
|
|
1144
1006
|
cssName: 'clip-path',
|
|
1145
|
-
valueChanged:
|
|
1146
|
-
|
|
1147
|
-
|
|
1007
|
+
valueChanged: (target, oldValue, newValue) => {
|
|
1008
|
+
target.backgroundInternal = target.backgroundInternal.withClipPath(newValue);
|
|
1009
|
+
},
|
|
1010
|
+
equalityComparer: (value1, value2) => {
|
|
1011
|
+
if (value1 instanceof ClipPathFunction && value2 instanceof ClipPathFunction) {
|
|
1012
|
+
return ClipPathFunction.equals(value1, value2);
|
|
1148
1013
|
}
|
|
1149
|
-
return
|
|
1150
|
-
}
|
|
1014
|
+
return value1 === value2;
|
|
1015
|
+
},
|
|
1016
|
+
valueConverter(value) {
|
|
1017
|
+
if (typeof value === 'string') {
|
|
1018
|
+
return parseClipPath(value);
|
|
1019
|
+
}
|
|
1020
|
+
return value;
|
|
1021
|
+
},
|
|
1151
1022
|
});
|
|
1152
1023
|
clipPathProperty.register(Style);
|
|
1153
|
-
function isFloatValueConverter(value) {
|
|
1154
|
-
const newValue = parseFloat(value);
|
|
1155
|
-
if (isNaN(newValue)) {
|
|
1156
|
-
throw new Error(`Invalid value: ${newValue}`);
|
|
1157
|
-
}
|
|
1158
|
-
return newValue;
|
|
1159
|
-
}
|
|
1160
1024
|
export const zIndexProperty = new CssProperty({
|
|
1161
1025
|
name: 'zIndex',
|
|
1162
1026
|
cssName: 'z-index',
|
|
1163
|
-
valueConverter:
|
|
1027
|
+
valueConverter: (value) => {
|
|
1028
|
+
const newValue = parseFloat(value);
|
|
1029
|
+
if (isNaN(newValue)) {
|
|
1030
|
+
throw new Error(`Invalid value: ${newValue}`);
|
|
1031
|
+
}
|
|
1032
|
+
return newValue;
|
|
1033
|
+
},
|
|
1164
1034
|
});
|
|
1165
1035
|
zIndexProperty.register(Style);
|
|
1166
|
-
function opacityConverter(value) {
|
|
1167
|
-
const newValue = parseFloat(value);
|
|
1168
|
-
if (!isNaN(newValue) && 0 <= newValue && newValue <= 1) {
|
|
1169
|
-
return newValue;
|
|
1170
|
-
}
|
|
1171
|
-
throw new Error(`Opacity should be between [0, 1]. Value: ${newValue}`);
|
|
1172
|
-
}
|
|
1173
1036
|
export const opacityProperty = new CssAnimationProperty({
|
|
1174
1037
|
name: 'opacity',
|
|
1175
1038
|
cssName: 'opacity',
|
|
1176
1039
|
defaultValue: 1,
|
|
1177
|
-
valueConverter:
|
|
1040
|
+
valueConverter: (value) => {
|
|
1041
|
+
const newValue = parseFloat(value);
|
|
1042
|
+
if (!isNonNegativeFiniteNumber(newValue) || newValue > 1) {
|
|
1043
|
+
throw new Error(`Opacity should be between [0, 1]. Value: ${newValue}`);
|
|
1044
|
+
}
|
|
1045
|
+
return newValue;
|
|
1046
|
+
},
|
|
1178
1047
|
});
|
|
1179
1048
|
opacityProperty.register(Style);
|
|
1180
1049
|
export const colorProperty = new InheritedCssProperty({
|