@nativescript/core 8.9.0-napi-es5.0 → 8.9.0-napi.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abortcontroller/abortsignal.js +16 -23
- package/abortcontroller/abortsignal.js.map +1 -1
- package/abortcontroller/index.js +14 -20
- package/abortcontroller/index.js.map +1 -1
- package/accessibility/accessibility-common.js +8 -8
- package/accessibility/accessibility-common.js.map +1 -1
- package/accessibility/accessibility-css-helper.js +27 -27
- package/accessibility/accessibility-css-helper.js.map +1 -1
- package/accessibility/accessibility-properties.js +22 -23
- package/accessibility/accessibility-properties.js.map +1 -1
- package/accessibility/accessibility-service-common.js +12 -22
- package/accessibility/accessibility-service-common.js.map +1 -1
- package/accessibility/accessibility-service.android.js +27 -39
- package/accessibility/accessibility-service.android.js.map +1 -1
- package/accessibility/accessibility-service.ios.js +14 -17
- package/accessibility/accessibility-service.ios.js.map +1 -1
- package/accessibility/font-scale-common.js +2 -2
- package/accessibility/font-scale-common.js.map +1 -1
- package/accessibility/font-scale.android.js +7 -8
- package/accessibility/font-scale.android.js.map +1 -1
- package/accessibility/font-scale.ios.js +9 -10
- package/accessibility/font-scale.ios.js.map +1 -1
- package/accessibility/index.android.js +77 -83
- package/accessibility/index.android.js.map +1 -1
- package/accessibility/index.ios.js +34 -36
- package/accessibility/index.ios.js.map +1 -1
- package/animation-frame/animation-native.ios.js +1 -1
- package/animation-frame/animation-native.ios.js.map +1 -1
- package/animation-frame/index.js +16 -16
- package/animation-frame/index.js.map +1 -1
- package/application/application-common.js +196 -214
- package/application/application-common.js.map +1 -1
- package/application/application-shims.js +39 -39
- package/application/application-shims.js.map +1 -1
- package/application/application.android.js +110 -149
- package/application/application.android.js.map +1 -1
- package/application/application.ios.js +162 -197
- package/application/application.ios.js.map +1 -1
- package/application-settings/index.android.js +11 -11
- package/application-settings/index.android.js.map +1 -1
- package/application-settings/index.ios.js +1 -1
- package/application-settings/index.ios.js.map +1 -1
- package/bundle-entry-points.js +1 -1
- package/bundle-entry-points.js.map +1 -1
- package/color/color-common.js +157 -200
- package/color/color-common.js.map +1 -1
- package/color/index.android.js +4 -14
- package/color/index.android.js.map +1 -1
- package/color/index.ios.js +14 -24
- package/color/index.ios.js.map +1 -1
- package/color/known-colors.js +144 -144
- package/color/known-colors.js.map +1 -1
- package/connectivity/index.android.js +23 -23
- package/connectivity/index.android.js.map +1 -1
- package/connectivity/index.ios.js +25 -25
- package/connectivity/index.ios.js.map +1 -1
- package/console/index.js +20 -24
- package/console/index.js.map +1 -1
- package/core-types/index.js +38 -38
- package/core-types/index.js.map +1 -1
- package/css/CSS3Parser.js +104 -106
- package/css/CSS3Parser.js.map +1 -1
- package/css/CSSNativeScript.js +29 -34
- package/css/CSSNativeScript.js.map +1 -1
- package/css/css-tree-parser.js.map +1 -1
- package/css/parser.js +158 -178
- package/css/parser.js.map +1 -1
- package/css/system-classes.js +9 -9
- package/css/system-classes.js.map +1 -1
- package/css-mediaquery/index.js +27 -29
- package/css-mediaquery/index.js.map +1 -1
- package/data/observable/index.js +115 -124
- package/data/observable/index.js.map +1 -1
- package/data/observable-array/index.js +119 -176
- package/data/observable-array/index.js.map +1 -1
- package/data/virtual-array/index.js +61 -74
- package/data/virtual-array/index.js.map +1 -1
- package/debugger/InspectorBackendCommands.js +137 -161
- package/debugger/InspectorBackendCommands.js.map +1 -1
- package/debugger/devtools-elements.common.js +20 -20
- package/debugger/devtools-elements.common.js.map +1 -1
- package/debugger/devtools-elements.js +2 -2
- package/debugger/devtools-elements.js.map +1 -1
- package/debugger/dom-node.js +61 -73
- package/debugger/dom-node.js.map +1 -1
- package/debugger/index.js +19 -19
- package/debugger/index.js.map +1 -1
- package/debugger/webinspector-css.js +25 -30
- package/debugger/webinspector-css.js.map +1 -1
- package/debugger/webinspector-dom.js +38 -43
- package/debugger/webinspector-dom.js.map +1 -1
- package/debugger/webinspector-network.android.js +103 -132
- package/debugger/webinspector-network.android.js.map +1 -1
- package/debugger/webinspector-network.ios.js +100 -128
- package/debugger/webinspector-network.ios.js.map +1 -1
- package/file-system/file-system-access.android.js +414 -421
- package/file-system/file-system-access.android.js.map +1 -1
- package/file-system/file-system-access.ios.js +203 -213
- package/file-system/file-system-access.ios.js.map +1 -1
- package/file-system/index.js +294 -372
- package/file-system/index.js.map +1 -1
- package/fps-meter/fps-native.android.js +15 -18
- package/fps-meter/fps-native.android.js.map +1 -1
- package/fps-meter/fps-native.ios.js +9 -11
- package/fps-meter/fps-native.ios.js.map +1 -1
- package/fps-meter/index.js +11 -11
- package/fps-meter/index.js.map +1 -1
- package/globals/index.js +88 -112
- package/globals/index.js.map +1 -1
- package/http/http-request/http-request-common.js +5 -5
- package/http/http-request/http-request-common.js.map +1 -1
- package/http/http-request/index.android.js +53 -54
- package/http/http-request/index.android.js.map +1 -1
- package/http/http-request/index.ios.js +56 -58
- package/http/http-request/index.ios.js.map +1 -1
- package/http/index.js +19 -19
- package/http/index.js.map +1 -1
- package/image-asset/image-asset-common.js +25 -37
- package/image-asset/image-asset-common.js.map +1 -1
- package/image-asset/index.android.js +17 -25
- package/image-asset/index.android.js.map +1 -1
- package/image-asset/index.ios.js +25 -35
- package/image-asset/index.ios.js.map +1 -1
- package/image-source/image-source-common.js +2 -2
- package/image-source/image-source-common.js.map +1 -1
- package/image-source/index.android.js +152 -178
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.ios.js +177 -203
- package/image-source/index.ios.js.map +1 -1
- package/index.js +4 -8
- package/index.js.map +1 -1
- package/matrix/index.js +17 -27
- package/matrix/index.js.map +1 -1
- package/media-query-list/index.js +61 -87
- package/media-query-list/index.js.map +1 -1
- package/module-name-resolver/index.js +21 -24
- package/module-name-resolver/index.js.map +1 -1
- package/module-name-resolver/non-bundle-workflow-compat.js +24 -24
- package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
- package/module-name-resolver/qualifier-matcher/index.js +46 -46
- package/module-name-resolver/qualifier-matcher/index.js.map +1 -1
- package/package.json +1 -1
- package/platform/common.js +5 -5
- package/platform/common.js.map +1 -1
- package/platform/device/index.android.js +68 -107
- package/platform/device/index.android.js.map +1 -1
- package/platform/device/index.ios.js +62 -101
- package/platform/device/index.ios.js.map +1 -1
- package/platform/screen/index.android.js +32 -63
- package/platform/screen/index.android.js.map +1 -1
- package/platform/screen/index.ios.js +29 -60
- package/platform/screen/index.ios.js.map +1 -1
- package/profiling/index.js +40 -47
- package/profiling/index.js.map +1 -1
- package/text/text-common.js +36 -49
- package/text/text-common.js.map +1 -1
- package/timer/index.android.js +20 -30
- package/timer/index.android.js.map +1 -1
- package/timer/index.ios.js +12 -22
- package/timer/index.ios.js.map +1 -1
- package/trace/index.js +26 -36
- package/trace/index.js.map +1 -1
- package/ui/action-bar/action-bar-common.js +193 -252
- package/ui/action-bar/action-bar-common.js.map +1 -1
- package/ui/action-bar/index.android.js +170 -212
- package/ui/action-bar/index.android.js.map +1 -1
- package/ui/action-bar/index.ios.js +208 -251
- package/ui/action-bar/index.ios.js.map +1 -1
- package/ui/activity-indicator/activity-indicator-common.js +6 -11
- package/ui/activity-indicator/activity-indicator-common.js.map +1 -1
- package/ui/activity-indicator/index.android.js +20 -26
- package/ui/activity-indicator/index.android.js.map +1 -1
- package/ui/activity-indicator/index.ios.js +23 -31
- package/ui/activity-indicator/index.ios.js.map +1 -1
- package/ui/animation/animation-common.js +43 -50
- package/ui/animation/animation-common.js.map +1 -1
- package/ui/animation/animation-interfaces.js +3 -5
- package/ui/animation/animation-interfaces.js.map +1 -1
- package/ui/animation/index.android.js +90 -94
- package/ui/animation/index.android.js.map +1 -1
- package/ui/animation/index.ios.js +225 -191
- package/ui/animation/index.ios.js.map +1 -1
- package/ui/animation/keyframe-animation.js +67 -89
- package/ui/animation/keyframe-animation.js.map +1 -1
- package/ui/builder/binding-builder.js +31 -31
- package/ui/builder/binding-builder.js.map +1 -1
- package/ui/builder/component-builder/index.js +37 -37
- package/ui/builder/component-builder/index.js.map +1 -1
- package/ui/builder/index.js +54 -59
- package/ui/builder/index.js.map +1 -1
- package/ui/builder/xml2ui.js +128 -158
- package/ui/builder/xml2ui.js.map +1 -1
- package/ui/button/button-common.js +18 -25
- package/ui/button/button-common.js.map +1 -1
- package/ui/button/index.android.js +69 -80
- package/ui/button/index.android.js.map +1 -1
- package/ui/button/index.ios.js +103 -114
- package/ui/button/index.ios.js.map +1 -1
- package/ui/content-view/index.js +60 -78
- package/ui/content-view/index.js.map +1 -1
- package/ui/core/bindable/bindable-expressions.js +93 -101
- package/ui/core/bindable/bindable-expressions.js.map +1 -1
- package/ui/core/bindable/bindable-resources.js +1 -1
- package/ui/core/bindable/index.js +136 -141
- package/ui/core/bindable/index.js.map +1 -1
- package/ui/core/control-state-change/index.android.js +5 -7
- package/ui/core/control-state-change/index.android.js.map +1 -1
- package/ui/core/control-state-change/index.ios.js +9 -13
- package/ui/core/control-state-change/index.ios.js.map +1 -1
- package/ui/core/properties/index.js +440 -489
- package/ui/core/properties/index.js.map +1 -1
- package/ui/core/view/index.android.js +348 -384
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.ios.js +364 -400
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.js +655 -944
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.android.js +15 -19
- package/ui/core/view/view-helper/index.android.js.map +1 -1
- package/ui/core/view/view-helper/index.ios.js +81 -85
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view/view-helper/view-helper-common.js +44 -49
- package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
- package/ui/core/view-base/index.js +371 -426
- package/ui/core/view-base/index.js.map +1 -1
- package/ui/core/weak-event-listener/index.js +25 -26
- package/ui/core/weak-event-listener/index.js.map +1 -1
- package/ui/date-picker/date-picker-common.js +30 -35
- package/ui/date-picker/date-picker-common.js.map +1 -1
- package/ui/date-picker/index.android.js +43 -51
- package/ui/date-picker/index.android.js.map +1 -1
- package/ui/date-picker/index.ios.js +51 -61
- package/ui/date-picker/index.ios.js.map +1 -1
- package/ui/dialogs/dialogs-common.js +18 -18
- package/ui/dialogs/dialogs-common.js.map +1 -1
- package/ui/dialogs/index.android.js +86 -98
- package/ui/dialogs/index.android.js.map +1 -1
- package/ui/dialogs/index.ios.js +67 -80
- package/ui/dialogs/index.ios.js.map +1 -1
- package/ui/editable-text-base/editable-text-base-common.js +29 -35
- package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
- package/ui/editable-text-base/index.android.js +106 -112
- package/ui/editable-text-base/index.android.js.map +1 -1
- package/ui/editable-text-base/index.ios.js +47 -53
- package/ui/editable-text-base/index.ios.js.map +1 -1
- package/ui/embedding/index.android.js +2 -3
- package/ui/embedding/index.android.js.map +1 -1
- package/ui/frame/activity.android.js +44 -44
- package/ui/frame/activity.android.js.map +1 -1
- package/ui/frame/callbacks/activity-callbacks.js +118 -123
- package/ui/frame/callbacks/activity-callbacks.js.map +1 -1
- package/ui/frame/callbacks/fragment-callbacks.js +139 -141
- package/ui/frame/callbacks/fragment-callbacks.js.map +1 -1
- package/ui/frame/fragment.android.js +21 -21
- package/ui/frame/fragment.android.js.map +1 -1
- package/ui/frame/fragment.ios.js +1 -1
- package/ui/frame/fragment.transitions.android.js +105 -114
- package/ui/frame/fragment.transitions.android.js.map +1 -1
- package/ui/frame/frame-common.d.ts +1 -1
- package/ui/frame/frame-common.js +249 -285
- package/ui/frame/frame-common.js.map +1 -1
- package/ui/frame/frame-helpers.js +1 -1
- package/ui/frame/frame-helpers.js.map +1 -1
- package/ui/frame/frame-stack.js +4 -4
- package/ui/frame/frame-stack.js.map +1 -1
- package/ui/frame/index.android.js +239 -291
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.ios.js +133 -167
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/gestures/gestures-common.js +15 -29
- package/ui/gestures/gestures-common.js.map +1 -1
- package/ui/gestures/index.android.js +108 -124
- package/ui/gestures/index.android.js.map +1 -1
- package/ui/gestures/index.ios.js +108 -121
- package/ui/gestures/index.ios.js.map +1 -1
- package/ui/gestures/touch-manager.js +42 -48
- package/ui/gestures/touch-manager.js.map +1 -1
- package/ui/html-view/html-view-common.js +9 -14
- package/ui/html-view/html-view-common.js.map +1 -1
- package/ui/html-view/index.android.js +37 -43
- package/ui/html-view/index.android.js.map +1 -1
- package/ui/html-view/index.ios.js +62 -73
- package/ui/html-view/index.ios.js.map +1 -1
- package/ui/image/image-common.js +47 -57
- package/ui/image/image-common.js.map +1 -1
- package/ui/image/index.android.js +54 -59
- package/ui/image/index.android.js.map +1 -1
- package/ui/image/index.ios.js +65 -72
- package/ui/image/index.ios.js.map +1 -1
- package/ui/image/symbol-effects-common.js +2 -6
- package/ui/image/symbol-effects-common.js.map +1 -1
- package/ui/image/symbol-effects.android.js +4 -10
- package/ui/image/symbol-effects.android.js.map +1 -1
- package/ui/image/symbol-effects.ios.js +7 -11
- package/ui/image/symbol-effects.ios.js.map +1 -1
- package/ui/image-cache/image-cache-common.js +57 -61
- package/ui/image-cache/image-cache-common.js.map +1 -1
- package/ui/image-cache/index.android.js +23 -27
- package/ui/image-cache/index.android.js.map +1 -1
- package/ui/image-cache/index.ios.js +24 -29
- package/ui/image-cache/index.ios.js.map +1 -1
- package/ui/label/index.android.js +29 -38
- package/ui/label/index.android.js.map +1 -1
- package/ui/label/index.ios.js +89 -102
- package/ui/label/index.ios.js.map +1 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.js +25 -30
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
- package/ui/layouts/absolute-layout/index.android.js +6 -12
- package/ui/layouts/absolute-layout/index.android.js.map +1 -1
- package/ui/layouts/absolute-layout/index.ios.js +32 -40
- package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
- package/ui/layouts/dock-layout/dock-layout-common.js +16 -21
- package/ui/layouts/dock-layout/dock-layout-common.js.map +1 -1
- package/ui/layouts/dock-layout/index.android.js +11 -17
- package/ui/layouts/dock-layout/index.android.js.map +1 -1
- package/ui/layouts/dock-layout/index.ios.js +45 -53
- package/ui/layouts/dock-layout/index.ios.js.map +1 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js +90 -115
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.android.js +92 -97
- package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.ios.js +366 -427
- package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
- package/ui/layouts/grid-layout/grid-layout-common.js +159 -211
- package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -1
- package/ui/layouts/grid-layout/index.android.js +49 -55
- package/ui/layouts/grid-layout/index.android.js.map +1 -1
- package/ui/layouts/grid-layout/index.ios.js +340 -348
- package/ui/layouts/grid-layout/index.ios.js.map +1 -1
- package/ui/layouts/layout-base-common.js +78 -106
- package/ui/layouts/layout-base-common.js.map +1 -1
- package/ui/layouts/layout-base.android.js +25 -31
- package/ui/layouts/layout-base.android.js.map +1 -1
- package/ui/layouts/layout-base.ios.js +21 -27
- package/ui/layouts/layout-base.ios.js.map +1 -1
- package/ui/layouts/root-layout/index.android.js +47 -46
- package/ui/layouts/root-layout/index.android.js.map +1 -1
- package/ui/layouts/root-layout/index.ios.js +54 -53
- package/ui/layouts/root-layout/index.ios.js.map +1 -1
- package/ui/layouts/root-layout/root-layout-common.js +186 -190
- package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
- package/ui/layouts/stack-layout/index.android.js +6 -12
- package/ui/layouts/stack-layout/index.android.js.map +1 -1
- package/ui/layouts/stack-layout/index.ios.js +62 -69
- package/ui/layouts/stack-layout/index.ios.js.map +1 -1
- package/ui/layouts/stack-layout/stack-layout-common.js +7 -12
- package/ui/layouts/stack-layout/stack-layout-common.js.map +1 -1
- package/ui/layouts/wrap-layout/index.android.js +10 -16
- package/ui/layouts/wrap-layout/index.android.js.map +1 -1
- package/ui/layouts/wrap-layout/index.ios.js +70 -76
- package/ui/layouts/wrap-layout/index.ios.js.map +1 -1
- package/ui/layouts/wrap-layout/wrap-layout-common.js +13 -18
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
- package/ui/list-picker/index.android.js +42 -48
- package/ui/list-picker/index.android.js.map +1 -1
- package/ui/list-picker/index.ios.js +26 -36
- package/ui/list-picker/index.ios.js.map +1 -1
- package/ui/list-picker/list-picker-common.js +27 -32
- package/ui/list-picker/list-picker-common.js.map +1 -1
- package/ui/list-view/index.android.js +98 -110
- package/ui/list-view/index.android.js.map +1 -1
- package/ui/list-view/index.ios.js +121 -137
- package/ui/list-view/index.ios.js.map +1 -1
- package/ui/list-view/list-view-common.js +100 -116
- package/ui/list-view/list-view-common.js.map +1 -1
- package/ui/page/index.android.js +57 -65
- package/ui/page/index.android.js.map +1 -1
- package/ui/page/index.ios.js +98 -107
- package/ui/page/index.ios.js.map +1 -1
- package/ui/page/page-common.js +113 -145
- package/ui/page/page-common.js.map +1 -1
- package/ui/placeholder/index.android.js +10 -16
- package/ui/placeholder/index.android.js.map +1 -1
- package/ui/placeholder/index.js +6 -12
- package/ui/placeholder/index.js.map +1 -1
- package/ui/progress/index.android.js +28 -34
- package/ui/progress/index.android.js.map +1 -1
- package/ui/progress/index.ios.js +29 -39
- package/ui/progress/index.ios.js.map +1 -1
- package/ui/progress/progress-common.js +11 -16
- package/ui/progress/progress-common.js.map +1 -1
- package/ui/proxy-view-container/index.js +90 -111
- package/ui/proxy-view-container/index.js.map +1 -1
- package/ui/repeater/index.js +100 -112
- package/ui/repeater/index.js.map +1 -1
- package/ui/scroll-view/index.android.d.ts +1 -1
- package/ui/scroll-view/index.android.js +75 -95
- package/ui/scroll-view/index.android.js.map +1 -1
- package/ui/scroll-view/index.ios.js +72 -92
- package/ui/scroll-view/index.ios.js.map +1 -1
- package/ui/scroll-view/scroll-view-common.js +45 -65
- package/ui/scroll-view/scroll-view-common.js.map +1 -1
- package/ui/search-bar/index.android.js +88 -94
- package/ui/search-bar/index.android.js.map +1 -1
- package/ui/search-bar/index.ios.js +74 -88
- package/ui/search-bar/index.ios.js.map +1 -1
- package/ui/search-bar/search-bar-common.js +13 -18
- package/ui/search-bar/search-bar-common.js.map +1 -1
- package/ui/segmented-bar/index.android.js +98 -112
- package/ui/segmented-bar/index.android.js.map +1 -1
- package/ui/segmented-bar/index.ios.js +63 -80
- package/ui/segmented-bar/index.ios.js.map +1 -1
- package/ui/segmented-bar/segmented-bar-common.js +61 -81
- package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
- package/ui/slider/index.android.js +43 -49
- package/ui/slider/index.android.js.map +1 -1
- package/ui/slider/index.ios.js +49 -59
- package/ui/slider/index.ios.js.map +1 -1
- package/ui/slider/slider-common.js +28 -35
- package/ui/slider/slider-common.js.map +1 -1
- package/ui/styling/background-common.js +98 -100
- package/ui/styling/background-common.js.map +1 -1
- package/ui/styling/background.android.js +35 -38
- package/ui/styling/background.android.js.map +1 -1
- package/ui/styling/background.ios.js +252 -258
- package/ui/styling/background.ios.js.map +1 -1
- package/ui/styling/box-shadow.js +2 -6
- package/ui/styling/box-shadow.js.map +1 -1
- package/ui/styling/converters.js +7 -7
- package/ui/styling/converters.js.map +1 -1
- package/ui/styling/css-animation-parser.js +56 -69
- package/ui/styling/css-animation-parser.js.map +1 -1
- package/ui/styling/css-selector.js +425 -522
- package/ui/styling/css-selector.js.map +1 -1
- package/ui/styling/css-shadow.js +2 -2
- package/ui/styling/css-shadow.js.map +1 -1
- package/ui/styling/css-stroke.js +3 -3
- package/ui/styling/css-stroke.js.map +1 -1
- package/ui/styling/css-utils.js +22 -22
- package/ui/styling/css-utils.js.map +1 -1
- package/ui/styling/font-common.js +44 -59
- package/ui/styling/font-common.js.map +1 -1
- package/ui/styling/font.android.js +34 -42
- package/ui/styling/font.android.js.map +1 -1
- package/ui/styling/font.ios.js +49 -54
- package/ui/styling/font.ios.js.map +1 -1
- package/ui/styling/linear-gradient.js +13 -17
- package/ui/styling/linear-gradient.js.map +1 -1
- package/ui/styling/style/index.js +36 -47
- package/ui/styling/style/index.js.map +1 -1
- package/ui/styling/style-properties.js +291 -306
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.js +377 -416
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/switch/index.android.js +41 -47
- package/ui/switch/index.android.js.map +1 -1
- package/ui/switch/index.ios.js +57 -66
- package/ui/switch/index.ios.js.map +1 -1
- package/ui/switch/switch-common.js +11 -16
- package/ui/switch/switch-common.js.map +1 -1
- package/ui/tab-view/index.android.js +187 -206
- package/ui/tab-view/index.android.js.map +1 -1
- package/ui/tab-view/index.ios.js +161 -177
- package/ui/tab-view/index.ios.js.map +1 -1
- package/ui/tab-view/tab-view-common.js +143 -197
- package/ui/tab-view/tab-view-common.js.map +1 -1
- package/ui/text-base/formatted-string.js +105 -158
- package/ui/text-base/formatted-string.js.map +1 -1
- package/ui/text-base/index.android.js +130 -136
- package/ui/text-base/index.android.js.map +1 -1
- package/ui/text-base/index.ios.js +112 -120
- package/ui/text-base/index.ios.js.map +1 -1
- package/ui/text-base/span.js +102 -158
- package/ui/text-base/span.js.map +1 -1
- package/ui/text-base/text-base-common.js +181 -268
- package/ui/text-base/text-base-common.js.map +1 -1
- package/ui/text-field/index.android.js +18 -24
- package/ui/text-field/index.android.js.map +1 -1
- package/ui/text-field/index.ios.js +70 -80
- package/ui/text-field/index.ios.js.map +1 -1
- package/ui/text-field/text-field-common.js +8 -13
- package/ui/text-field/text-field-common.js.map +1 -1
- package/ui/text-view/index.android.js +13 -19
- package/ui/text-view/index.android.js.map +1 -1
- package/ui/text-view/index.ios.js +116 -124
- package/ui/text-view/index.ios.js.map +1 -1
- package/ui/text-view/text-view-common.js +3 -9
- package/ui/text-view/text-view-common.js.map +1 -1
- package/ui/time-picker/index.android.js +18 -24
- package/ui/time-picker/index.android.js.map +1 -1
- package/ui/time-picker/index.ios.js +61 -69
- package/ui/time-picker/index.ios.js.map +1 -1
- package/ui/time-picker/time-picker-common.js +37 -42
- package/ui/time-picker/time-picker-common.js.map +1 -1
- package/ui/transition/fade-transition.android.js +8 -14
- package/ui/transition/fade-transition.android.js.map +1 -1
- package/ui/transition/fade-transition.ios.js +4 -10
- package/ui/transition/fade-transition.ios.js.map +1 -1
- package/ui/transition/flip-transition.android.js +14 -18
- package/ui/transition/flip-transition.android.js.map +1 -1
- package/ui/transition/index.android.js +24 -27
- package/ui/transition/index.android.js.map +1 -1
- package/ui/transition/index.ios.js +18 -22
- package/ui/transition/index.ios.js.map +1 -1
- package/ui/transition/modal-transition.android.js +4 -10
- package/ui/transition/modal-transition.android.js.map +1 -1
- package/ui/transition/modal-transition.ios.js +18 -25
- package/ui/transition/modal-transition.ios.js.map +1 -1
- package/ui/transition/page-transition.android.js +57 -71
- package/ui/transition/page-transition.android.js.map +1 -1
- package/ui/transition/page-transition.ios.js +19 -27
- package/ui/transition/page-transition.ios.js.map +1 -1
- package/ui/transition/shared-transition-helper.android.js +8 -12
- package/ui/transition/shared-transition-helper.android.js.map +1 -1
- package/ui/transition/shared-transition-helper.ios.js +442 -539
- package/ui/transition/shared-transition-helper.ios.js.map +1 -1
- package/ui/transition/shared-transition.js +77 -76
- package/ui/transition/shared-transition.js.map +1 -1
- package/ui/transition/slide-transition.android.js +17 -22
- package/ui/transition/slide-transition.android.js.map +1 -1
- package/ui/transition/slide-transition.ios.js +7 -11
- package/ui/transition/slide-transition.ios.js.map +1 -1
- package/ui/utils.ios.js +13 -13
- package/ui/utils.ios.js.map +1 -1
- package/ui/web-view/index.android.js +50 -64
- package/ui/web-view/index.android.js.map +1 -1
- package/ui/web-view/index.ios.js +50 -73
- package/ui/web-view/index.ios.js.map +1 -1
- package/ui/web-view/web-view-common.js +29 -43
- package/ui/web-view/web-view-common.js.map +1 -1
- package/utils/android/index.js +26 -27
- package/utils/android/index.js.map +1 -1
- package/utils/common.js +49 -65
- package/utils/common.js.map +1 -1
- package/utils/constants.android.js +1 -1
- package/utils/constants.android.js.map +1 -1
- package/utils/constants.ios.js +1 -1
- package/utils/constants.ios.js.map +1 -1
- package/utils/debug.js +32 -54
- package/utils/debug.js.map +1 -1
- package/utils/index.android.js +40 -36
- package/utils/index.android.js.map +1 -1
- package/utils/index.ios.js +9 -9
- package/utils/index.ios.js.map +1 -1
- package/utils/ios/index.js +45 -42
- package/utils/ios/index.js.map +1 -1
- package/utils/layout-helper/index.android.js +4 -4
- package/utils/layout-helper/index.android.js.map +1 -1
- package/utils/layout-helper/index.ios.js +2 -2
- package/utils/layout-helper/index.ios.js.map +1 -1
- package/utils/layout-helper/layout-helper-common.js +13 -13
- package/utils/layout-helper/layout-helper-common.js.map +1 -1
- package/utils/lazy.js +2 -2
- package/utils/lazy.js.map +1 -1
- package/utils/macrotask-scheduler.js +6 -6
- package/utils/macrotask-scheduler.js.map +1 -1
- package/utils/mainthread-helper.android.js +4 -4
- package/utils/mainthread-helper.android.js.map +1 -1
- package/utils/mainthread-helper.ios.js +1 -1
- package/utils/mainthread-helper.ios.js.map +1 -1
- package/utils/module-merge.js +1 -1
- package/utils/module-merge.js.map +1 -1
- package/utils/native-helper.android.js +19 -19
- package/utils/native-helper.android.js.map +1 -1
- package/utils/native-helper.ios.js +16 -23
- package/utils/native-helper.ios.js.map +1 -1
- package/utils/number-utils.js +3 -3
- package/utils/number-utils.js.map +1 -1
- package/utils/platform-check.js +6 -6
- package/utils/platform-check.js.map +1 -1
- package/utils/types.js +33 -43
- package/utils/types.js.map +1 -1
- package/wgc/crypto/SubtleCrypto.js +132 -167
- package/wgc/crypto/SubtleCrypto.js.map +1 -1
- package/wgc/crypto/index.d.ts +1 -1
- package/wgc/crypto/index.js +10 -18
- package/wgc/crypto/index.js.map +1 -1
- package/xhr/index.js +226 -308
- package/xhr/index.js.map +1 -1
- package/xml/index.js +78 -118
- package/xml/index.js.map +1 -1
|
@@ -9,14 +9,11 @@ import { ios as iosHelper } from '../../utils/native-helper';
|
|
|
9
9
|
import { Screen } from '../../platform';
|
|
10
10
|
export * from './animation-common';
|
|
11
11
|
export { KeyframeAnimation, KeyframeAnimationInfo, KeyframeDeclaration, KeyframeInfo } from './keyframe-animation';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
return AnimationInfo;
|
|
19
|
-
}());
|
|
12
|
+
const _transform = '_transform';
|
|
13
|
+
const _skip = '_skip';
|
|
14
|
+
const FLT_MAX = 340282346638528859811704183484516925440.0;
|
|
15
|
+
class AnimationInfo {
|
|
16
|
+
}
|
|
20
17
|
var AnimationDelegateImpl = /** @class */ (function (_super) {
|
|
21
18
|
__extends(AnimationDelegateImpl, _super);
|
|
22
19
|
function AnimationDelegateImpl() {
|
|
@@ -114,83 +111,80 @@ export function _resolveAnimationCurve(curve) {
|
|
|
114
111
|
return CAMediaTimingFunction.functionWithControlPoints(curve.x1, curve.y1, curve.x2, curve.y2);
|
|
115
112
|
}
|
|
116
113
|
else {
|
|
117
|
-
console.error(
|
|
114
|
+
console.error(`Invalid animation curve: ${curve}`);
|
|
118
115
|
}
|
|
119
116
|
}
|
|
120
117
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
_this._valueSource = 'animation';
|
|
118
|
+
export class Animation extends AnimationBase {
|
|
119
|
+
constructor(animationDefinitions, playSequentially) {
|
|
120
|
+
super(animationDefinitions, playSequentially);
|
|
121
|
+
this._valueSource = 'animation';
|
|
126
122
|
if (animationDefinitions.length > 0 && animationDefinitions[0].valueSource !== undefined) {
|
|
127
|
-
|
|
123
|
+
this._valueSource = animationDefinitions[0].valueSource;
|
|
128
124
|
}
|
|
129
125
|
if (!playSequentially) {
|
|
130
126
|
if (Trace.isEnabled()) {
|
|
131
|
-
Trace.write('Non-merged Property Animations: ' +
|
|
127
|
+
Trace.write('Non-merged Property Animations: ' + this._propertyAnimations.length, Trace.categories.Animation);
|
|
132
128
|
}
|
|
133
|
-
|
|
129
|
+
this._mergedPropertyAnimations = Animation._mergeAffineTransformAnimations(this._propertyAnimations);
|
|
134
130
|
if (Trace.isEnabled()) {
|
|
135
|
-
Trace.write('Merged Property Animations: ' +
|
|
131
|
+
Trace.write('Merged Property Animations: ' + this._mergedPropertyAnimations.length, Trace.categories.Animation);
|
|
136
132
|
}
|
|
137
133
|
}
|
|
138
134
|
else {
|
|
139
|
-
|
|
135
|
+
this._mergedPropertyAnimations = this._propertyAnimations;
|
|
140
136
|
}
|
|
141
|
-
|
|
142
|
-
if (
|
|
137
|
+
const animationFinishedCallback = (cancelled) => {
|
|
138
|
+
if (this._playSequentially) {
|
|
143
139
|
// This function will be called by the last animation when done or by another animation if the user cancels them halfway through.
|
|
144
140
|
if (!cancelled) {
|
|
145
|
-
|
|
141
|
+
this._resolveAnimationFinishedPromise();
|
|
146
142
|
}
|
|
147
143
|
}
|
|
148
144
|
else {
|
|
149
145
|
// This callback will be called by each INDIVIDUAL animation when it finishes or is cancelled.
|
|
150
146
|
if (cancelled) {
|
|
151
|
-
|
|
147
|
+
this._cancelledAnimations++;
|
|
152
148
|
}
|
|
153
149
|
else {
|
|
154
|
-
|
|
150
|
+
this._finishedAnimations++;
|
|
155
151
|
}
|
|
156
|
-
if (
|
|
152
|
+
if (this._cancelledAnimations > 0 && this._cancelledAnimations + this._finishedAnimations === this._mergedPropertyAnimations.length) {
|
|
157
153
|
if (Trace.isEnabled()) {
|
|
158
|
-
Trace.write(
|
|
154
|
+
Trace.write(this._cancelledAnimations + ' animations cancelled.', Trace.categories.Animation);
|
|
159
155
|
}
|
|
160
156
|
}
|
|
161
|
-
else if (
|
|
157
|
+
else if (this._finishedAnimations === this._mergedPropertyAnimations.length) {
|
|
162
158
|
if (Trace.isEnabled()) {
|
|
163
|
-
Trace.write(
|
|
159
|
+
Trace.write(this._finishedAnimations + ' animations finished.', Trace.categories.Animation);
|
|
164
160
|
}
|
|
165
|
-
|
|
161
|
+
this._resolveAnimationFinishedPromise();
|
|
166
162
|
}
|
|
167
163
|
}
|
|
168
164
|
};
|
|
169
|
-
|
|
170
|
-
return _this;
|
|
165
|
+
this._iOSAnimationFunction = Animation._createiOSAnimationFunction(this._mergedPropertyAnimations, 0, this._playSequentially, this._valueSource, animationFinishedCallback);
|
|
171
166
|
}
|
|
172
|
-
|
|
167
|
+
play() {
|
|
173
168
|
if (this.isPlaying) {
|
|
174
169
|
return this._rejectAlreadyPlaying();
|
|
175
170
|
}
|
|
176
|
-
|
|
171
|
+
const animationFinishedPromise = super.play();
|
|
177
172
|
this._finishedAnimations = 0;
|
|
178
173
|
this._cancelledAnimations = 0;
|
|
179
174
|
this._iOSAnimationFunction();
|
|
180
175
|
return animationFinishedPromise;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
var _a;
|
|
176
|
+
}
|
|
177
|
+
cancel() {
|
|
184
178
|
if (!this.isPlaying) {
|
|
185
179
|
Trace.write('Animation is not currently playing.', Trace.categories.Animation, Trace.messageType.warn);
|
|
186
180
|
return;
|
|
187
181
|
}
|
|
188
182
|
if (this._mergedPropertyAnimations) {
|
|
189
|
-
for (
|
|
190
|
-
|
|
183
|
+
for (let i = 0; i < this._mergedPropertyAnimations.length; i++) {
|
|
184
|
+
const propertyAnimation = this._mergedPropertyAnimations[i];
|
|
191
185
|
if (propertyAnimation) {
|
|
192
|
-
if (
|
|
193
|
-
|
|
186
|
+
if (propertyAnimation.target?.nativeViewProtected) {
|
|
187
|
+
const nativeView = propertyAnimation.target.nativeViewProtected;
|
|
194
188
|
if (nativeView.layer.mask) {
|
|
195
189
|
nativeView.layer.mask.removeAllAnimations();
|
|
196
190
|
}
|
|
@@ -204,10 +198,10 @@ var Animation = /** @class */ (function (_super) {
|
|
|
204
198
|
if (nativeView.borderLayer.mask) {
|
|
205
199
|
nativeView.borderLayer.mask.removeAllAnimations();
|
|
206
200
|
}
|
|
207
|
-
|
|
208
|
-
if (borderLayers
|
|
209
|
-
for (
|
|
210
|
-
borderLayers[
|
|
201
|
+
const borderLayers = nativeView.borderLayer.sublayers;
|
|
202
|
+
if (borderLayers?.count) {
|
|
203
|
+
for (let i = 0, count = borderLayers.count; i < count; i++) {
|
|
204
|
+
borderLayers[i].removeAllAnimations();
|
|
211
205
|
}
|
|
212
206
|
}
|
|
213
207
|
nativeView.borderLayer.removeAllAnimations();
|
|
@@ -217,10 +211,10 @@ var Animation = /** @class */ (function (_super) {
|
|
|
217
211
|
if (nativeView.outerShadowContainerLayer.mask) {
|
|
218
212
|
nativeView.outerShadowContainerLayer.mask.removeAllAnimations();
|
|
219
213
|
}
|
|
220
|
-
|
|
221
|
-
if (outerShadowLayers
|
|
222
|
-
for (
|
|
223
|
-
|
|
214
|
+
const outerShadowLayers = nativeView.outerShadowContainerLayer.sublayers;
|
|
215
|
+
if (outerShadowLayers?.count) {
|
|
216
|
+
for (let i = 0, count = outerShadowLayers.count; i < count; i++) {
|
|
217
|
+
const shadowLayer = outerShadowLayers[i];
|
|
224
218
|
if (shadowLayer.mask) {
|
|
225
219
|
shadowLayer.mask.removeAllAnimations();
|
|
226
220
|
}
|
|
@@ -236,12 +230,12 @@ var Animation = /** @class */ (function (_super) {
|
|
|
236
230
|
}
|
|
237
231
|
}
|
|
238
232
|
}
|
|
239
|
-
}
|
|
240
|
-
|
|
233
|
+
}
|
|
234
|
+
_resolveAnimationCurve(curve) {
|
|
241
235
|
return _resolveAnimationCurve(curve);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
return
|
|
236
|
+
}
|
|
237
|
+
static _createiOSAnimationFunction(propertyAnimations, index, playSequentially, valueSource, finishedCallback) {
|
|
238
|
+
return (cancelled) => {
|
|
245
239
|
if (cancelled && finishedCallback) {
|
|
246
240
|
if (Trace.isEnabled()) {
|
|
247
241
|
Trace.write('Animation ' + (index - 1).toString() + ' was cancelled. Will skip the rest of animations and call finishedCallback(true).', Trace.categories.Animation);
|
|
@@ -249,8 +243,8 @@ var Animation = /** @class */ (function (_super) {
|
|
|
249
243
|
finishedCallback(cancelled);
|
|
250
244
|
return;
|
|
251
245
|
}
|
|
252
|
-
|
|
253
|
-
|
|
246
|
+
const animation = propertyAnimations[index];
|
|
247
|
+
const args = Animation._getNativeAnimationArguments(animation, valueSource);
|
|
254
248
|
if (animation.curve === 'spring') {
|
|
255
249
|
Animation._createNativeSpringAnimation(propertyAnimations, index, playSequentially, args, animation, valueSource, finishedCallback);
|
|
256
250
|
}
|
|
@@ -258,35 +252,34 @@ var Animation = /** @class */ (function (_super) {
|
|
|
258
252
|
Animation._createNativeAnimation(propertyAnimations, index, playSequentially, args, animation, valueSource, finishedCallback);
|
|
259
253
|
}
|
|
260
254
|
};
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
var fromValue;
|
|
255
|
+
}
|
|
256
|
+
static _getNativeAnimationArguments(animation, valueSource) {
|
|
257
|
+
const view = animation.target;
|
|
258
|
+
const style = view.style;
|
|
259
|
+
const nativeView = view.nativeViewProtected;
|
|
260
|
+
const parent = view.parent;
|
|
261
|
+
let propertyNameToAnimate = animation.property;
|
|
262
|
+
let subPropertyNameToAnimate;
|
|
263
|
+
let toValue = animation.value;
|
|
264
|
+
let fromValue;
|
|
272
265
|
if (nativeView) {
|
|
273
|
-
|
|
266
|
+
const setLocal = valueSource === 'animation';
|
|
274
267
|
switch (animation.property) {
|
|
275
268
|
case Properties.backgroundColor:
|
|
276
269
|
animation._originalValue = view.backgroundColor;
|
|
277
|
-
animation._propertyResetCallback =
|
|
278
|
-
style[
|
|
270
|
+
animation._propertyResetCallback = (value, valueSource) => {
|
|
271
|
+
style[setLocal ? backgroundColorProperty.name : backgroundColorProperty.keyframe] = value;
|
|
279
272
|
};
|
|
280
273
|
fromValue = nativeView.layer.backgroundColor;
|
|
281
274
|
if (nativeView instanceof UILabel) {
|
|
282
275
|
nativeView.setValueForKey(UIColor.clearColor, 'backgroundColor');
|
|
283
276
|
}
|
|
284
|
-
toValue =
|
|
277
|
+
toValue = toValue?.ios?.CGColor;
|
|
285
278
|
break;
|
|
286
279
|
case Properties.opacity:
|
|
287
280
|
animation._originalValue = view.opacity;
|
|
288
|
-
animation._propertyResetCallback =
|
|
289
|
-
style[
|
|
281
|
+
animation._propertyResetCallback = (value, valueSource) => {
|
|
282
|
+
style[setLocal ? opacityProperty.name : opacityProperty.keyframe] = value;
|
|
290
283
|
};
|
|
291
284
|
fromValue = nativeView.layer.opacity;
|
|
292
285
|
break;
|
|
@@ -296,10 +289,10 @@ var Animation = /** @class */ (function (_super) {
|
|
|
296
289
|
y: view.rotateY,
|
|
297
290
|
z: view.rotate,
|
|
298
291
|
};
|
|
299
|
-
animation._propertyResetCallback =
|
|
300
|
-
style[
|
|
301
|
-
style[
|
|
302
|
-
style[
|
|
292
|
+
animation._propertyResetCallback = (value, valueSource) => {
|
|
293
|
+
style[setLocal ? rotateProperty.name : rotateProperty.keyframe] = value.z;
|
|
294
|
+
style[setLocal ? rotateXProperty.name : rotateXProperty.keyframe] = value.x;
|
|
295
|
+
style[setLocal ? rotateYProperty.name : rotateYProperty.keyframe] = value.y;
|
|
303
296
|
};
|
|
304
297
|
propertyNameToAnimate = 'transform.rotation';
|
|
305
298
|
subPropertyNameToAnimate = ['x', 'y', 'z'];
|
|
@@ -329,9 +322,9 @@ var Animation = /** @class */ (function (_super) {
|
|
|
329
322
|
x: view.translateX,
|
|
330
323
|
y: view.translateY,
|
|
331
324
|
};
|
|
332
|
-
animation._propertyResetCallback =
|
|
333
|
-
style[
|
|
334
|
-
style[
|
|
325
|
+
animation._propertyResetCallback = (value, valueSource) => {
|
|
326
|
+
style[setLocal ? translateXProperty.name : translateXProperty.keyframe] = value.x;
|
|
327
|
+
style[setLocal ? translateYProperty.name : translateYProperty.keyframe] = value.y;
|
|
335
328
|
};
|
|
336
329
|
propertyNameToAnimate = 'transform';
|
|
337
330
|
fromValue = NSValue.valueWithCATransform3D(nativeView.layer.transform);
|
|
@@ -345,9 +338,9 @@ var Animation = /** @class */ (function (_super) {
|
|
|
345
338
|
toValue.y = 0.001;
|
|
346
339
|
}
|
|
347
340
|
animation._originalValue = { x: view.scaleX, y: view.scaleY };
|
|
348
|
-
animation._propertyResetCallback =
|
|
349
|
-
style[
|
|
350
|
-
style[
|
|
341
|
+
animation._propertyResetCallback = (value, valueSource) => {
|
|
342
|
+
style[setLocal ? scaleXProperty.name : scaleXProperty.keyframe] = value.x;
|
|
343
|
+
style[setLocal ? scaleYProperty.name : scaleYProperty.keyframe] = value.y;
|
|
351
344
|
};
|
|
352
345
|
propertyNameToAnimate = 'transform';
|
|
353
346
|
fromValue = NSValue.valueWithCATransform3D(nativeView.layer.transform);
|
|
@@ -364,53 +357,53 @@ var Animation = /** @class */ (function (_super) {
|
|
|
364
357
|
ry: view.rotateY,
|
|
365
358
|
rz: view.rotate,
|
|
366
359
|
};
|
|
367
|
-
animation._propertyResetCallback =
|
|
368
|
-
style[
|
|
369
|
-
style[
|
|
370
|
-
style[
|
|
371
|
-
style[
|
|
372
|
-
style[
|
|
373
|
-
style[
|
|
374
|
-
style[
|
|
360
|
+
animation._propertyResetCallback = (value, valueSource) => {
|
|
361
|
+
style[setLocal ? translateXProperty.name : translateXProperty.keyframe] = value.xt;
|
|
362
|
+
style[setLocal ? translateYProperty.name : translateYProperty.keyframe] = value.yt;
|
|
363
|
+
style[setLocal ? scaleXProperty.name : scaleXProperty.keyframe] = value.xs;
|
|
364
|
+
style[setLocal ? scaleYProperty.name : scaleYProperty.keyframe] = value.ys;
|
|
365
|
+
style[setLocal ? rotateXProperty.name : rotateXProperty.keyframe] = value.rx;
|
|
366
|
+
style[setLocal ? rotateYProperty.name : rotateYProperty.keyframe] = value.ry;
|
|
367
|
+
style[setLocal ? rotateProperty.name : rotateProperty.keyframe] = value.rz;
|
|
375
368
|
};
|
|
376
369
|
propertyNameToAnimate = 'transform';
|
|
377
370
|
toValue = NSValue.valueWithCATransform3D(Animation._createNativeAffineTransform(animation));
|
|
378
371
|
break;
|
|
379
372
|
case Properties.width:
|
|
380
373
|
case Properties.height: {
|
|
381
|
-
|
|
382
|
-
|
|
374
|
+
const direction = animation.property;
|
|
375
|
+
const isHeight = direction === 'height';
|
|
383
376
|
propertyNameToAnimate = 'bounds';
|
|
384
377
|
if (!parent) {
|
|
385
|
-
console.error(
|
|
378
|
+
console.error(`cannot animate ${direction} on root view`);
|
|
386
379
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
380
|
+
const parentExtent = isHeight ? parent.getMeasuredHeight() : parent.getMeasuredWidth();
|
|
381
|
+
const asNumber = PercentLength.toDevicePixels(PercentLength.parse(toValue), parentExtent, parentExtent) / Screen.mainScreen.scale;
|
|
382
|
+
const currentBounds = nativeView.layer.bounds;
|
|
383
|
+
const extentX = isHeight ? currentBounds.size.width : asNumber;
|
|
384
|
+
const extentY = isHeight ? asNumber : currentBounds.size.height;
|
|
392
385
|
fromValue = NSValue.valueWithCGRect(currentBounds);
|
|
393
386
|
toValue = NSValue.valueWithCGRect(CGRectMake(currentBounds.origin.x, currentBounds.origin.y, extentX, extentY));
|
|
394
|
-
animation._originalValue = view[
|
|
395
|
-
animation._propertyResetCallback =
|
|
396
|
-
|
|
397
|
-
style[
|
|
387
|
+
animation._originalValue = view[isHeight ? 'height' : 'width'];
|
|
388
|
+
animation._propertyResetCallback = (value, valueSource) => {
|
|
389
|
+
const prop = isHeight ? heightProperty : widthProperty;
|
|
390
|
+
style[setLocal ? prop.name : prop.keyframe] = value;
|
|
398
391
|
};
|
|
399
392
|
break;
|
|
400
393
|
}
|
|
401
394
|
default:
|
|
402
|
-
console.error(
|
|
395
|
+
console.error(`Animating property '${animation.property}' is unsupported`);
|
|
403
396
|
}
|
|
404
397
|
}
|
|
405
|
-
|
|
398
|
+
let duration = 0.3;
|
|
406
399
|
if (animation.duration !== undefined) {
|
|
407
400
|
duration = animation.duration / 1000.0;
|
|
408
401
|
}
|
|
409
|
-
|
|
402
|
+
let delay = undefined;
|
|
410
403
|
if (animation.delay) {
|
|
411
404
|
delay = animation.delay / 1000.0;
|
|
412
405
|
}
|
|
413
|
-
|
|
406
|
+
let repeatCount = undefined;
|
|
414
407
|
if (animation.iterations !== undefined) {
|
|
415
408
|
if (animation.iterations === Number.POSITIVE_INFINITY) {
|
|
416
409
|
repeatCount = FLT_MAX;
|
|
@@ -428,17 +421,17 @@ var Animation = /** @class */ (function (_super) {
|
|
|
428
421
|
repeatCount: repeatCount,
|
|
429
422
|
delay: delay,
|
|
430
423
|
};
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
424
|
+
}
|
|
425
|
+
static _createNativeAnimation(propertyAnimations, index, playSequentially, args, animation, valueSource, finishedCallback) {
|
|
426
|
+
const nativeView = animation.target.nativeViewProtected;
|
|
427
|
+
let nativeAnimation;
|
|
435
428
|
if (args.subPropertiesToAnimate) {
|
|
436
429
|
nativeAnimation = this._createGroupAnimation(args, animation);
|
|
437
430
|
}
|
|
438
431
|
else {
|
|
439
432
|
nativeAnimation = this._createBasicAnimation(args, animation);
|
|
440
433
|
}
|
|
441
|
-
|
|
434
|
+
const animationDelegate = AnimationDelegateImpl.initWithFinishedCallback(finishedCallback, animation, valueSource);
|
|
442
435
|
nativeAnimation.setValueForKey(animationDelegate, 'delegate');
|
|
443
436
|
if (nativeView) {
|
|
444
437
|
nativeView.layer.addAnimationForKey(nativeAnimation, args.propertyNameToAnimate);
|
|
@@ -450,7 +443,7 @@ var Animation = /** @class */ (function (_super) {
|
|
|
450
443
|
nativeView.outerShadowContainerLayer.addAnimationForKey(nativeAnimation, args.propertyNameToAnimate);
|
|
451
444
|
}
|
|
452
445
|
}
|
|
453
|
-
|
|
446
|
+
let callback = undefined;
|
|
454
447
|
if (index + 1 < propertyAnimations.length) {
|
|
455
448
|
callback = Animation._createiOSAnimationFunction(propertyAnimations, index + 1, playSequentially, valueSource, finishedCallback);
|
|
456
449
|
if (!playSequentially) {
|
|
@@ -460,10 +453,9 @@ var Animation = /** @class */ (function (_super) {
|
|
|
460
453
|
animationDelegate.nextAnimation = callback;
|
|
461
454
|
}
|
|
462
455
|
}
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
var groupAnimation = CAAnimationGroup.new();
|
|
456
|
+
}
|
|
457
|
+
static _createGroupAnimation(args, animation) {
|
|
458
|
+
const groupAnimation = CAAnimationGroup.new();
|
|
467
459
|
groupAnimation.duration = args.duration;
|
|
468
460
|
if (args.repeatCount !== undefined) {
|
|
469
461
|
groupAnimation.repeatCount = args.repeatCount;
|
|
@@ -474,20 +466,20 @@ var Animation = /** @class */ (function (_super) {
|
|
|
474
466
|
if (animation.curve !== undefined) {
|
|
475
467
|
groupAnimation.timingFunction = animation.curve;
|
|
476
468
|
}
|
|
477
|
-
|
|
478
|
-
args.subPropertiesToAnimate.forEach(
|
|
479
|
-
|
|
480
|
-
basicAnimationArgs.propertyNameToAnimate =
|
|
469
|
+
const animations = NSMutableArray.alloc().initWithCapacity(3);
|
|
470
|
+
args.subPropertiesToAnimate.forEach((property) => {
|
|
471
|
+
const basicAnimationArgs = { ...args, duration: undefined, repeatCount: undefined, delay: undefined, curve: undefined };
|
|
472
|
+
basicAnimationArgs.propertyNameToAnimate = `${args.propertyNameToAnimate}.${property}`;
|
|
481
473
|
basicAnimationArgs.fromValue = args.fromValue[property];
|
|
482
474
|
basicAnimationArgs.toValue = args.toValue[property];
|
|
483
|
-
|
|
475
|
+
const basicAnimation = this._createBasicAnimation(basicAnimationArgs, animation);
|
|
484
476
|
animations.addObject(basicAnimation);
|
|
485
477
|
});
|
|
486
478
|
groupAnimation.animations = animations;
|
|
487
479
|
return groupAnimation;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
|
|
480
|
+
}
|
|
481
|
+
static _createBasicAnimation(args, animation) {
|
|
482
|
+
const basicAnimation = CABasicAnimation.animationWithKeyPath(args.propertyNameToAnimate);
|
|
491
483
|
basicAnimation.fromValue = args.fromValue;
|
|
492
484
|
basicAnimation.toValue = args.toValue;
|
|
493
485
|
basicAnimation.duration = args.duration;
|
|
@@ -501,11 +493,11 @@ var Animation = /** @class */ (function (_super) {
|
|
|
501
493
|
basicAnimation.timingFunction = animation.curve;
|
|
502
494
|
}
|
|
503
495
|
return basicAnimation;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
496
|
+
}
|
|
497
|
+
static _createNativeSpringAnimation(propertyAnimations, index, playSequentially, args, animation, valueSource, finishedCallback) {
|
|
498
|
+
const nativeView = animation.target.nativeViewProtected;
|
|
499
|
+
let callback = undefined;
|
|
500
|
+
let nextAnimation;
|
|
509
501
|
if (index + 1 < propertyAnimations.length) {
|
|
510
502
|
callback = Animation._createiOSAnimationFunction(propertyAnimations, index + 1, playSequentially, valueSource, finishedCallback);
|
|
511
503
|
if (!playSequentially) {
|
|
@@ -515,11 +507,11 @@ var Animation = /** @class */ (function (_super) {
|
|
|
515
507
|
nextAnimation = callback;
|
|
516
508
|
}
|
|
517
509
|
}
|
|
518
|
-
|
|
510
|
+
let delay = 0;
|
|
519
511
|
if (args.delay) {
|
|
520
512
|
delay = args.delay;
|
|
521
513
|
}
|
|
522
|
-
UIView.animateWithDurationDelayUsingSpringWithDampingInitialSpringVelocityOptionsAnimationsCompletion(args.duration, delay, 0.2, 0, 196608 /* UIViewAnimationOptions.CurveLinear */,
|
|
514
|
+
UIView.animateWithDurationDelayUsingSpringWithDampingInitialSpringVelocityOptionsAnimationsCompletion(args.duration, delay, 0.2, 0, 196608 /* UIViewAnimationOptions.CurveLinear */, () => {
|
|
523
515
|
if (args.repeatCount !== undefined) {
|
|
524
516
|
UIView.setAnimationRepeatCount(args.repeatCount);
|
|
525
517
|
}
|
|
@@ -576,41 +568,41 @@ var Animation = /** @class */ (function (_super) {
|
|
|
576
568
|
}
|
|
577
569
|
}
|
|
578
570
|
if (finishedCallback) {
|
|
579
|
-
|
|
571
|
+
const cancelled = !animationDidFinish;
|
|
580
572
|
finishedCallback(cancelled);
|
|
581
573
|
}
|
|
582
574
|
if (animationDidFinish && nextAnimation) {
|
|
583
575
|
nextAnimation();
|
|
584
576
|
}
|
|
585
577
|
});
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
578
|
+
}
|
|
579
|
+
static _createNativeAffineTransform(animation) {
|
|
580
|
+
const value = animation.value;
|
|
581
|
+
let result = CATransform3DIdentity;
|
|
590
582
|
if (value[Properties.translate] !== undefined) {
|
|
591
|
-
|
|
592
|
-
|
|
583
|
+
const x = value[Properties.translate].x;
|
|
584
|
+
const y = value[Properties.translate].y;
|
|
593
585
|
result = CATransform3DTranslate(result, x, y, 0);
|
|
594
586
|
}
|
|
595
587
|
if (value[Properties.scale] !== undefined) {
|
|
596
|
-
|
|
597
|
-
|
|
588
|
+
const x = value[Properties.scale].x;
|
|
589
|
+
const y = value[Properties.scale].y;
|
|
598
590
|
result = CATransform3DScale(result, x === 0 ? 0.001 : x, y === 0 ? 0.001 : y, 1);
|
|
599
591
|
}
|
|
600
592
|
return result;
|
|
601
|
-
}
|
|
602
|
-
|
|
593
|
+
}
|
|
594
|
+
static _isAffineTransform(property) {
|
|
603
595
|
return property === _transform || property === Properties.translate || property === Properties.scale;
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
|
|
596
|
+
}
|
|
597
|
+
static _canBeMerged(animation1, animation2) {
|
|
598
|
+
const result = Animation._isAffineTransform(animation1.property) && Animation._isAffineTransform(animation2.property) && animation1.target === animation2.target && animation1.duration === animation2.duration && animation1.delay === animation2.delay && animation1.iterations === animation2.iterations && animation1.curve === animation2.curve;
|
|
607
599
|
return result;
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
600
|
+
}
|
|
601
|
+
static _mergeAffineTransformAnimations(propertyAnimations) {
|
|
602
|
+
const result = new Array();
|
|
603
|
+
let i = 0;
|
|
604
|
+
let j;
|
|
605
|
+
const length = propertyAnimations.length;
|
|
614
606
|
for (; i < length; i++) {
|
|
615
607
|
if (propertyAnimations[i][_skip]) {
|
|
616
608
|
continue;
|
|
@@ -627,7 +619,7 @@ var Animation = /** @class */ (function (_super) {
|
|
|
627
619
|
// rotate: 90,
|
|
628
620
|
// scale: {x: 2, y: 2 }
|
|
629
621
|
// }
|
|
630
|
-
|
|
622
|
+
const newTransformAnimation = {
|
|
631
623
|
target: propertyAnimations[i].target,
|
|
632
624
|
property: _transform,
|
|
633
625
|
value: {},
|
|
@@ -661,17 +653,17 @@ var Animation = /** @class */ (function (_super) {
|
|
|
661
653
|
}
|
|
662
654
|
}
|
|
663
655
|
return result;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
|
|
656
|
+
}
|
|
657
|
+
static animateNestedLayerSizeUsingBasicAnimation(nativeView, bounds, animation, args, nativeAnimation) {
|
|
658
|
+
const view = animation.target;
|
|
667
659
|
// Gradient background animation
|
|
668
660
|
if (nativeView.gradientLayer) {
|
|
669
661
|
nativeView.gradientLayer.addAnimationForKey(nativeAnimation, 'bounds');
|
|
670
662
|
}
|
|
671
|
-
|
|
663
|
+
let clipPath; // This is also used for animating shadow
|
|
672
664
|
// Clipping mask animation
|
|
673
665
|
if (nativeView.layer.mask instanceof CAShapeLayer) {
|
|
674
|
-
|
|
666
|
+
let toValue;
|
|
675
667
|
if (nativeView.maskType === iosViewUtils.LayerMask.BORDER) {
|
|
676
668
|
toValue = iosBackground.generateNonUniformBorderOuterClipRoundedPath(view, bounds);
|
|
677
669
|
}
|
|
@@ -683,31 +675,51 @@ var Animation = /** @class */ (function (_super) {
|
|
|
683
675
|
Trace.write('Unknown mask on animating view: ' + view, Trace.categories.Animation, Trace.messageType.info);
|
|
684
676
|
}
|
|
685
677
|
if (toValue) {
|
|
686
|
-
nativeView.layer.mask.addAnimationForKey(this._createBasicAnimation(
|
|
678
|
+
nativeView.layer.mask.addAnimationForKey(this._createBasicAnimation({
|
|
679
|
+
...args,
|
|
680
|
+
propertyNameToAnimate: 'path',
|
|
681
|
+
fromValue: nativeView.layer.mask.path,
|
|
682
|
+
toValue,
|
|
683
|
+
}, animation), 'path');
|
|
687
684
|
}
|
|
688
685
|
}
|
|
689
686
|
// Border animations (uniform and non-uniform)
|
|
690
687
|
if (nativeView.hasNonUniformBorder) {
|
|
691
688
|
if (nativeView.borderLayer) {
|
|
692
|
-
|
|
689
|
+
const innerClipPath = iosBackground.generateNonUniformBorderInnerClipRoundedPath(animation.target, bounds);
|
|
693
690
|
if (nativeView.hasNonUniformBorderColor) {
|
|
694
|
-
|
|
691
|
+
const borderMask = nativeView.borderLayer.mask;
|
|
695
692
|
if (borderMask instanceof CAShapeLayer) {
|
|
696
|
-
borderMask.addAnimationForKey(this._createBasicAnimation(
|
|
693
|
+
borderMask.addAnimationForKey(this._createBasicAnimation({
|
|
694
|
+
...args,
|
|
695
|
+
propertyNameToAnimate: 'path',
|
|
696
|
+
fromValue: borderMask.path,
|
|
697
|
+
toValue: innerClipPath,
|
|
698
|
+
}, animation), 'path');
|
|
697
699
|
}
|
|
698
|
-
|
|
699
|
-
if (borderLayers
|
|
700
|
-
|
|
701
|
-
for (
|
|
702
|
-
|
|
700
|
+
const borderLayers = nativeView.borderLayer.sublayers;
|
|
701
|
+
if (borderLayers?.count) {
|
|
702
|
+
const paths = iosBackground.generateNonUniformMultiColorBorderRoundedPaths(animation.target, bounds);
|
|
703
|
+
for (let i = 0, count = borderLayers.count; i < count; i++) {
|
|
704
|
+
const layer = nativeView.borderLayer.sublayers[i];
|
|
703
705
|
if (layer instanceof CAShapeLayer) {
|
|
704
|
-
layer.addAnimationForKey(this._createBasicAnimation(
|
|
706
|
+
layer.addAnimationForKey(this._createBasicAnimation({
|
|
707
|
+
...args,
|
|
708
|
+
propertyNameToAnimate: 'path',
|
|
709
|
+
fromValue: layer.path,
|
|
710
|
+
toValue: paths[i],
|
|
711
|
+
}, animation), 'path');
|
|
705
712
|
}
|
|
706
713
|
}
|
|
707
714
|
}
|
|
708
715
|
}
|
|
709
716
|
else {
|
|
710
|
-
nativeView.borderLayer.addAnimationForKey(this._createBasicAnimation(
|
|
717
|
+
nativeView.borderLayer.addAnimationForKey(this._createBasicAnimation({
|
|
718
|
+
...args,
|
|
719
|
+
propertyNameToAnimate: 'path',
|
|
720
|
+
fromValue: nativeView.borderLayer.path,
|
|
721
|
+
toValue: innerClipPath,
|
|
722
|
+
}, animation), 'path');
|
|
711
723
|
}
|
|
712
724
|
}
|
|
713
725
|
}
|
|
@@ -715,47 +727,65 @@ var Animation = /** @class */ (function (_super) {
|
|
|
715
727
|
// TODO: Animate border width when borders get support for percentage values
|
|
716
728
|
// Uniform corner radius also relies on view size
|
|
717
729
|
if (nativeView.layer.cornerRadius) {
|
|
718
|
-
nativeView.layer.addAnimationForKey(this._createBasicAnimation(
|
|
730
|
+
nativeView.layer.addAnimationForKey(this._createBasicAnimation({
|
|
731
|
+
...args,
|
|
732
|
+
propertyNameToAnimate: 'cornerRadius',
|
|
733
|
+
fromValue: nativeView.layer.cornerRadius,
|
|
734
|
+
toValue: iosBackground.getUniformBorderRadius(animation.target, bounds),
|
|
735
|
+
}, animation), 'cornerRadius');
|
|
719
736
|
}
|
|
720
737
|
}
|
|
721
738
|
// Shadow layers do not inherit from animating view layer
|
|
722
739
|
if (nativeView.outerShadowContainerLayer) {
|
|
723
|
-
|
|
740
|
+
const shadowClipMask = nativeView.outerShadowContainerLayer.mask;
|
|
724
741
|
// This is for animating view clip path on shadow
|
|
725
742
|
if (clipPath && shadowClipMask instanceof CAShapeLayer) {
|
|
726
|
-
shadowClipMask.addAnimationForKey(this._createBasicAnimation(
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
743
|
+
shadowClipMask.addAnimationForKey(this._createBasicAnimation({
|
|
744
|
+
...args,
|
|
745
|
+
propertyNameToAnimate: 'path',
|
|
746
|
+
fromValue: shadowClipMask.path,
|
|
747
|
+
toValue: clipPath,
|
|
748
|
+
}, animation), 'path');
|
|
749
|
+
}
|
|
750
|
+
const outerShadowLayers = nativeView.outerShadowContainerLayer.sublayers;
|
|
751
|
+
if (outerShadowLayers?.count) {
|
|
752
|
+
const { maskPath, shadowPath } = iosBackground.generateShadowLayerPaths(view, bounds);
|
|
753
|
+
for (let i = 0, count = outerShadowLayers.count; i < count; i++) {
|
|
754
|
+
const shadowLayer = outerShadowLayers[i];
|
|
755
|
+
shadowLayer.addAnimationForKey(this._createBasicAnimation({
|
|
756
|
+
...args,
|
|
757
|
+
propertyNameToAnimate: 'shadowPath',
|
|
758
|
+
fromValue: shadowLayer.shadowPath,
|
|
759
|
+
toValue: shadowPath,
|
|
760
|
+
}, animation), 'shadowPath');
|
|
734
761
|
if (shadowLayer.mask instanceof CAShapeLayer) {
|
|
735
|
-
shadowLayer.mask.addAnimationForKey(this._createBasicAnimation(
|
|
762
|
+
shadowLayer.mask.addAnimationForKey(this._createBasicAnimation({
|
|
763
|
+
...args,
|
|
764
|
+
propertyNameToAnimate: 'path',
|
|
765
|
+
fromValue: shadowLayer.mask.path,
|
|
766
|
+
toValue: maskPath,
|
|
767
|
+
}, animation), 'path');
|
|
736
768
|
}
|
|
737
769
|
}
|
|
738
770
|
}
|
|
739
771
|
}
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
}(AnimationBase));
|
|
743
|
-
export { Animation };
|
|
772
|
+
}
|
|
773
|
+
}
|
|
744
774
|
export function _getTransformMismatchErrorMessage(view) {
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
775
|
+
const expectedTransform = calculateTransform(view);
|
|
776
|
+
const expectedTransformString = getCATransform3DString(expectedTransform);
|
|
777
|
+
const actualTransformString = getCATransform3DString(view.nativeViewProtected.layer.transform);
|
|
748
778
|
if (actualTransformString !== expectedTransformString) {
|
|
749
779
|
return 'View and Native transforms do not match.\nActual: ' + actualTransformString + ';\nExpected: ' + expectedTransformString;
|
|
750
780
|
}
|
|
751
781
|
return undefined;
|
|
752
782
|
}
|
|
753
783
|
function calculateTransform(view) {
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
784
|
+
const scaleX = view.scaleX || 1e-6;
|
|
785
|
+
const scaleY = view.scaleY || 1e-6;
|
|
786
|
+
const perspective = view.perspective || 300;
|
|
757
787
|
// Order is important: translate, rotate, scale
|
|
758
|
-
|
|
788
|
+
let expectedTransform = new CATransform3D(CATransform3DIdentity);
|
|
759
789
|
// Only set perspective if there is 3D rotation
|
|
760
790
|
if (view.rotateX || view.rotateY) {
|
|
761
791
|
expectedTransform.m34 = -1 / perspective;
|
|
@@ -766,6 +796,10 @@ function calculateTransform(view) {
|
|
|
766
796
|
return expectedTransform;
|
|
767
797
|
}
|
|
768
798
|
function getCATransform3DString(t) {
|
|
769
|
-
return
|
|
799
|
+
return `[
|
|
800
|
+
${t.m11}, ${t.m12}, ${t.m13}, ${t.m14},
|
|
801
|
+
${t.m21}, ${t.m22}, ${t.m23}, ${t.m24},
|
|
802
|
+
${t.m31}, ${t.m32}, ${t.m33}, ${t.m34},
|
|
803
|
+
${t.m41}, ${t.m42}, ${t.m43}, ${t.m44}]`;
|
|
770
804
|
}
|
|
771
805
|
//# sourceMappingURL=index.ios.js.map
|