@nativescript/core 9.0.0-next-07-26-2025-16544379102 → 9.0.0-preview.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/accessibility/accessibility-common.d.ts +264 -0
- package/accessibility/accessibility-common.js +352 -0
- package/accessibility/accessibility-common.js.map +1 -1
- package/accessibility/accessibility-properties.d.ts +1 -1
- package/accessibility/accessibility-properties.js +2 -2
- package/accessibility/accessibility-properties.js.map +1 -1
- package/accessibility/index.d.ts +0 -36
- package/accessibility/index.js +2 -0
- package/accessibility/index.js.map +1 -0
- package/application/application-common.d.ts +6 -8
- package/application/application-common.js +21 -14
- package/application/application-common.js.map +1 -1
- package/application/application-interfaces.d.ts +2 -3
- package/application/application.android.d.ts +14 -7
- package/application/application.android.js +754 -75
- package/application/application.android.js.map +1 -1
- package/application/application.d.ts +25 -0
- package/application/application.ios.d.ts +16 -18
- package/application/application.ios.js +455 -45
- package/application/application.ios.js.map +1 -1
- package/application/helpers-common.d.ts +50 -0
- package/application/helpers-common.js +153 -0
- package/application/helpers-common.js.map +1 -0
- package/application/helpers.android.d.ts +17 -0
- package/application/helpers.android.js +173 -0
- package/application/helpers.android.js.map +1 -0
- package/application/helpers.d.ts +25 -0
- package/application/helpers.ios.d.ts +27 -0
- package/application/helpers.ios.js +62 -0
- package/application/helpers.ios.js.map +1 -0
- package/application-settings/index.android.js +2 -2
- package/application-settings/index.android.js.map +1 -1
- package/color/color-common.d.ts +18 -19
- package/color/color-common.js +13 -14
- package/color/color-common.js.map +1 -1
- package/color/color-types.d.ts +49 -0
- package/color/color-types.js +3 -0
- package/color/color-types.js.map +1 -0
- package/color/index.ios.d.ts +2 -1
- package/color/index.ios.js.map +1 -1
- package/connectivity/index.android.js +5 -4
- package/connectivity/index.android.js.map +1 -1
- package/core-types/animation-types.d.ts +11 -0
- package/{ui/animation/animation-interfaces.js → core-types/animation-types.js} +1 -1
- package/core-types/animation-types.js.map +1 -0
- package/core-types/index.d.ts +1 -1
- package/core-types/index.js +2 -2
- package/core-types/index.js.map +1 -1
- package/core-types/validators.d.ts +2 -0
- package/core-types/validators.js +18 -0
- package/core-types/validators.js.map +1 -0
- package/css/css-tree-parser.js +17 -21
- package/css/css-tree-parser.js.map +1 -1
- package/css/lib/parse/index.d.ts +1 -0
- package/css/lib/parse/index.js +475 -577
- package/css/lib/parse/index.js.map +1 -0
- package/css/reworkcss.d.ts +25 -28
- package/css/reworkcss.js +5 -1
- package/css/reworkcss.js.map +1 -0
- package/css-mediaquery/index.js +1 -1
- package/css-mediaquery/index.js.map +1 -1
- package/css-value/reworkcss-value.d.ts +31 -8
- package/css-value/reworkcss-value.js +89 -111
- package/css-value/reworkcss-value.js.map +1 -0
- package/debugger/devtools-elements-interfaces.d.ts +1 -1
- package/debugger/devtools-elements.common.js +17 -8
- package/debugger/devtools-elements.common.js.map +1 -1
- package/debugger/devtools-elements.js +1 -1
- package/debugger/devtools-elements.js.map +1 -1
- package/debugger/dom-types.d.ts +24 -0
- package/debugger/{dom-node.js → dom-types.js} +11 -9
- package/debugger/dom-types.js.map +1 -0
- package/debugger/webinspector-css.d.ts +18 -18
- package/debugger/webinspector-css.js +1 -1
- package/debugger/webinspector-css.js.map +1 -1
- package/debugger/webinspector-dom.d.ts +15 -15
- package/debugger/webinspector-dom.js +1 -1
- package/debugger/webinspector-dom.js.map +1 -1
- package/debugger/webinspector-network.android.d.ts +9 -9
- package/debugger/webinspector-network.android.js +3 -3
- package/debugger/webinspector-network.android.js.map +1 -1
- package/debugger/webinspector-network.ios.d.ts +9 -9
- package/debugger/webinspector-network.ios.js +1 -1
- package/debugger/webinspector-network.ios.js.map +1 -1
- package/fetch/index.d.ts +72 -0
- package/fetch/index.js +448 -458
- package/fetch/index.js.map +1 -0
- package/file-system/file-system-access.android.js +32 -39
- package/file-system/file-system-access.android.js.map +1 -1
- package/file-system/file-system-access.ios.js +2 -15
- package/file-system/file-system-access.ios.js.map +1 -1
- package/file-system/index.d.ts +2 -2
- package/file-system/index.js +4 -11
- package/file-system/index.js.map +1 -1
- package/fps-meter/fps-native.android.d.ts +1 -2
- package/fps-meter/fps-native.android.js.map +1 -1
- package/fps-meter/fps-native.ios.d.ts +1 -2
- package/fps-meter/fps-native.ios.js.map +1 -1
- package/global-types.d.ts +7 -8
- package/globals/global-utils.d.ts +27 -0
- package/globals/global-utils.js +67 -0
- package/globals/global-utils.js.map +1 -0
- package/globals/index.d.ts +3 -7
- package/globals/index.js +276 -281
- package/globals/index.js.map +1 -1
- package/http/http-interfaces.d.ts +84 -0
- package/http/http-interfaces.js +6 -0
- package/http/http-interfaces.js.map +1 -0
- package/http/http-request/http-request-common.js +2 -2
- package/http/http-request/http-request-common.js.map +1 -1
- package/http/http-request/index.android.d.ts +3 -7
- package/http/http-request/index.android.js +6 -22
- package/http/http-request/index.android.js.map +1 -1
- package/http/http-request/index.d.ts +5 -1
- package/http/http-request/index.ios.d.ts +3 -7
- package/http/http-request/index.ios.js +6 -22
- package/http/http-request/index.ios.js.map +1 -1
- package/http/http-shared.d.ts +5 -0
- package/http/http-shared.js +14 -0
- package/http/http-shared.js.map +1 -0
- package/http/index.d.ts +6 -105
- package/http/index.js +10 -12
- package/http/index.js.map +1 -1
- package/image-asset/index.android.js +3 -3
- package/image-asset/index.android.js.map +1 -1
- package/image-source/index.android.d.ts +1 -1
- package/image-source/index.android.js +5 -23
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.ios.js +2 -9
- package/image-source/index.ios.js.map +1 -1
- package/index.d.ts +12 -8
- package/index.js +6 -3
- package/index.js.map +1 -1
- package/inspector_modules.d.ts +11 -0
- package/inspector_modules.js +111 -3
- package/inspector_modules.js.map +1 -1
- package/js-libs/easysax/easysax.js +5 -3
- package/media-query-list/index.js +7 -17
- package/media-query-list/index.js.map +1 -1
- package/module-name-resolver/helpers.d.ts +14 -0
- package/module-name-resolver/helpers.js +27 -0
- package/module-name-resolver/helpers.js.map +1 -0
- package/module-name-resolver/index.d.ts +12 -22
- package/module-name-resolver/index.js +6 -18
- package/module-name-resolver/index.js.map +1 -1
- package/module-name-resolver/non-bundle-workflow-compat.js +32 -23
- package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
- package/module-name-resolver/qualifier-matcher/index.d.ts +6 -12
- package/module-name-resolver/qualifier-matcher/index.js +5 -5
- package/module-name-resolver/qualifier-matcher/index.js.map +1 -1
- package/package.json +5 -2
- package/platform/device/index.android.js +2 -2
- package/platform/device/index.android.js.map +1 -1
- package/platform/screen/index.android.js +2 -2
- package/platform/screen/index.android.js.map +1 -1
- package/platform/screen/index.ios.js +2 -2
- package/platform/screen/index.ios.js.map +1 -1
- package/profiling/index.js +2 -1
- package/profiling/index.js.map +1 -1
- package/ui/action-bar/action-bar-common.js +4 -2
- package/ui/action-bar/action-bar-common.js.map +1 -1
- package/ui/action-bar/index.android.js +7 -6
- package/ui/action-bar/index.android.js.map +1 -1
- package/ui/action-bar/index.ios.js +10 -11
- package/ui/action-bar/index.ios.js.map +1 -1
- package/ui/activity-indicator/index.ios.js +3 -4
- package/ui/activity-indicator/index.ios.js.map +1 -1
- package/ui/animation/animation-common.d.ts +4 -4
- package/ui/animation/animation-common.js +2 -3
- package/ui/animation/animation-common.js.map +1 -1
- package/ui/animation/{animation-interfaces.d.ts → animation-shared.d.ts} +39 -31
- package/ui/animation/animation-shared.js +4 -0
- package/ui/animation/animation-shared.js.map +1 -0
- package/ui/animation/animation-types.d.ts +1 -0
- package/ui/animation/animation-types.js +3 -0
- package/ui/animation/animation-types.js.map +1 -0
- package/ui/animation/index.android.d.ts +1 -2
- package/ui/animation/index.android.js +5 -5
- package/ui/animation/index.android.js.map +1 -1
- package/ui/animation/index.d.ts +2 -138
- package/ui/animation/index.ios.d.ts +1 -2
- package/ui/animation/index.ios.js +3 -3
- package/ui/animation/index.ios.js.map +1 -1
- package/ui/animation/keyframe-animation.d.ts +67 -118
- package/ui/animation/keyframe-animation.js +2 -2
- package/ui/animation/keyframe-animation.js.map +1 -1
- package/ui/builder/binding-builder.d.ts +12 -15
- package/ui/builder/component-builder/index.js +5 -5
- package/ui/builder/component-builder/index.js.map +1 -1
- package/ui/builder/index.d.ts +179 -59
- package/ui/builder/index.js +450 -10
- package/ui/builder/index.js.map +1 -1
- package/ui/button/index.android.js +2 -1
- package/ui/button/index.android.js.map +1 -1
- package/ui/core/bindable/bindable-types.d.ts +37 -0
- package/ui/core/bindable/bindable-types.js +3 -0
- package/ui/core/bindable/bindable-types.js.map +1 -0
- package/ui/core/bindable/index.d.ts +2 -38
- package/ui/core/bindable/index.js +1 -2
- package/ui/core/bindable/index.js.map +1 -1
- package/ui/core/properties/index.d.ts +4 -37
- package/ui/core/properties/index.js +6 -35
- package/ui/core/properties/index.js.map +1 -1
- package/ui/core/properties/property-shared.d.ts +35 -0
- package/ui/core/properties/property-shared.js +16 -0
- package/ui/core/properties/property-shared.js.map +1 -0
- package/ui/core/view/index.android.d.ts +2 -2
- package/ui/core/view/index.android.js +13 -10
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.d.ts +1 -61
- package/ui/core/view/index.ios.d.ts +3 -3
- package/ui/core/view/index.ios.js +11 -11
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.d.ts +19 -16
- package/ui/core/view/view-common.js +12 -14
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.ios.d.ts +2 -1
- package/ui/core/view/view-helper/index.ios.js +3 -4
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view/view-helper/view-helper-common.js +1 -3
- package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
- package/ui/core/view/view-helper/view-helper-shared.d.ts +5 -0
- package/ui/core/view/view-helper/view-helper-shared.js +6 -0
- package/ui/core/view/view-helper/view-helper-shared.js.map +1 -0
- package/ui/core/view/view-interfaces.d.ts +54 -0
- package/ui/core/view/view-interfaces.js +2 -0
- package/ui/core/view/view-interfaces.js.map +1 -0
- package/ui/core/view-base/index.d.ts +22 -24
- package/ui/core/view-base/index.js +9 -30
- package/ui/core/view-base/index.js.map +1 -1
- package/ui/core/view-base/utils.d.ts +1 -0
- package/ui/core/view-base/utils.js +9 -0
- package/ui/core/view-base/utils.js.map +1 -0
- package/ui/dialogs/dialogs-common.js +3 -3
- package/ui/dialogs/dialogs-common.js.map +1 -1
- package/ui/dialogs/index.android.js +8 -7
- package/ui/dialogs/index.android.js.map +1 -1
- package/ui/dialogs/index.ios.js +2 -2
- package/ui/dialogs/index.ios.js.map +1 -1
- package/ui/embedding/index.android.d.ts +1 -1
- package/ui/embedding/index.d.ts +1 -1
- package/ui/frame/fragment.android.js +3 -2
- package/ui/frame/fragment.android.js.map +1 -1
- package/ui/frame/fragment.transitions.android.js.map +1 -1
- package/ui/frame/frame-common.d.ts +3 -3
- package/ui/frame/frame-common.js.map +1 -1
- package/ui/frame/{callbacks/fragment-callbacks.d.ts → frame-helper-for-android.d.ts} +20 -1
- package/ui/frame/{callbacks/fragment-callbacks.js → frame-helper-for-android.js} +52 -38
- package/ui/frame/frame-helper-for-android.js.map +1 -0
- package/ui/frame/frame-interfaces.d.ts +30 -4
- package/ui/frame/frame-interfaces.js.map +1 -1
- package/ui/frame/frame-stack.js.map +1 -1
- package/ui/frame/index.android.d.ts +21 -5
- package/ui/frame/index.android.js +296 -19
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.d.ts +19 -60
- package/ui/frame/index.ios.d.ts +3 -2
- package/ui/frame/index.ios.js +5 -4
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/gestures/gestures-common.d.ts +4 -273
- package/ui/gestures/gestures-common.js +3 -146
- package/ui/gestures/gestures-common.js.map +1 -1
- package/ui/gestures/gestures-types.d.ts +108 -0
- package/ui/gestures/gestures-types.js +40 -0
- package/ui/gestures/gestures-types.js.map +1 -0
- package/ui/gestures/index.android.d.ts +29 -1
- package/ui/gestures/index.android.js +4 -2
- package/ui/gestures/index.android.js.map +1 -1
- package/ui/gestures/index.d.ts +35 -0
- package/ui/gestures/index.ios.d.ts +35 -1
- package/ui/gestures/index.ios.js +3 -3
- package/ui/gestures/index.ios.js.map +1 -1
- package/ui/gestures/touch-manager.d.ts +1 -1
- package/ui/html-view/index.ios.js +3 -3
- package/ui/html-view/index.ios.js.map +1 -1
- package/ui/image/image-common.js +1 -1
- package/ui/image/image-common.js.map +1 -1
- package/ui/image/index.android.js +1 -1
- package/ui/image/index.android.js.map +1 -1
- package/ui/image-cache/index.ios.js +5 -11
- package/ui/image-cache/index.ios.js.map +1 -1
- package/ui/index.d.ts +10 -5
- package/ui/index.js +18 -3
- package/ui/index.js.map +1 -1
- package/ui/label/index.ios.js.map +1 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.js +1 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
- package/ui/layouts/absolute-layout/index.android.js +1 -1
- package/ui/layouts/absolute-layout/index.android.js.map +1 -1
- package/ui/layouts/absolute-layout/index.d.ts +1 -1
- package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js +2 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.android.js +1 -1
- package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
- package/ui/layouts/layout-base.android.js +2 -1
- package/ui/layouts/layout-base.android.js.map +1 -1
- package/ui/layouts/stack-layout/index.ios.js.map +1 -1
- package/ui/layouts/wrap-layout/index.android.js +1 -1
- package/ui/layouts/wrap-layout/index.android.js.map +1 -1
- package/ui/layouts/wrap-layout/index.d.ts +1 -1
- package/ui/layouts/wrap-layout/wrap-layout-common.js +1 -1
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
- package/ui/list-view/index.android.d.ts +17 -1
- package/ui/list-view/index.android.js +402 -32
- package/ui/list-view/index.android.js.map +1 -1
- package/ui/list-view/index.d.ts +66 -1
- package/ui/list-view/index.ios.d.ts +24 -2
- package/ui/list-view/index.ios.js +385 -10
- package/ui/list-view/index.ios.js.map +1 -1
- package/ui/list-view/list-view-common.d.ts +15 -0
- package/ui/list-view/list-view-common.js +73 -1
- package/ui/list-view/list-view-common.js.map +1 -1
- package/ui/page/events.d.ts +6 -0
- package/ui/page/events.js +7 -0
- package/ui/page/events.js.map +1 -0
- package/ui/page/index.android.js +2 -1
- package/ui/page/index.android.js.map +1 -1
- package/ui/page/index.d.ts +1 -1
- package/ui/page/index.ios.js +4 -5
- package/ui/page/index.ios.js.map +1 -1
- package/ui/page/page-common.d.ts +3 -2
- package/ui/page/page-common.js +5 -4
- package/ui/page/page-common.js.map +1 -1
- package/ui/scroll-view/index.ios.js +3 -3
- package/ui/scroll-view/index.ios.js.map +1 -1
- package/ui/styling/background-common.js +0 -1
- package/ui/styling/background-common.js.map +1 -1
- package/ui/styling/background.android.d.ts +0 -6
- package/ui/styling/background.android.js +1 -53
- package/ui/styling/background.android.js.map +1 -1
- package/ui/styling/background.ios.js +2 -1
- package/ui/styling/background.ios.js.map +1 -1
- package/ui/styling/converters.d.ts +2 -2
- package/ui/styling/css-shadow.js.map +1 -1
- package/ui/styling/css-stroke.js.map +1 -1
- package/ui/styling/css-transform.d.ts +1 -1
- package/ui/styling/css-utils.js +1 -1
- package/ui/styling/css-utils.js.map +1 -1
- package/ui/styling/font.android.js +2 -2
- package/ui/styling/font.android.js.map +1 -1
- package/ui/styling/font.ios.js +10 -10
- package/ui/styling/font.ios.js.map +1 -1
- package/ui/styling/length-shared.d.ts +52 -0
- package/ui/styling/length-shared.js +173 -0
- package/ui/styling/length-shared.js.map +1 -0
- package/ui/styling/style/index.d.ts +1 -1
- package/ui/styling/style-properties.d.ts +58 -112
- package/ui/styling/style-properties.js +7 -93
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.d.ts +85 -48
- package/ui/styling/style-scope.js +30 -36
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/styling/styling-profile.d.ts +1 -0
- package/ui/styling/styling-profile.js +4 -0
- package/ui/styling/styling-profile.js.map +1 -0
- package/ui/styling/styling-shared.d.ts +3 -0
- package/ui/styling/styling-shared.js +6 -0
- package/ui/styling/styling-shared.js.map +1 -0
- package/ui/switch/index.ios.js +5 -5
- package/ui/switch/index.ios.js.map +1 -1
- package/ui/tab-view/index.android.js +6 -6
- package/ui/tab-view/index.android.js.map +1 -1
- package/ui/text-base/index.android.d.ts +1 -1
- package/ui/text-base/index.android.js +4 -4
- package/ui/text-base/index.android.js.map +1 -1
- package/ui/text-base/index.d.ts +1 -1
- package/ui/text-base/index.ios.js +5 -4
- package/ui/text-base/index.ios.js.map +1 -1
- package/ui/text-view/index.ios.js.map +1 -1
- package/ui/transition/fade-transition.ios.js +1 -1
- package/ui/transition/fade-transition.ios.js.map +1 -1
- package/ui/transition/index.ios.js +1 -1
- package/ui/transition/index.ios.js.map +1 -1
- package/ui/transition/modal-transition.ios.js +1 -1
- package/ui/transition/modal-transition.ios.js.map +1 -1
- package/ui/transition/page-transition.android.d.ts +1 -1
- package/ui/transition/page-transition.android.js +4 -4
- package/ui/transition/page-transition.android.js.map +1 -1
- package/ui/transition/page-transition.ios.js +1 -1
- package/ui/transition/page-transition.ios.js.map +1 -1
- package/ui/transition/shared-transition-helper.ios.js +1 -1
- package/ui/transition/shared-transition-helper.ios.js.map +1 -1
- package/ui/transition/shared-transition.js +2 -1
- package/ui/transition/shared-transition.js.map +1 -1
- package/ui/transition/slide-transition.ios.js +2 -2
- package/ui/transition/slide-transition.ios.js.map +1 -1
- package/utils/animation-helpers.d.ts +27 -0
- package/utils/animation-helpers.js +48 -0
- package/utils/animation-helpers.js.map +1 -0
- package/utils/common.d.ts +1 -38
- package/utils/common.js +2 -112
- package/utils/common.js.map +1 -1
- package/utils/debug-source.d.ts +19 -0
- package/utils/debug-source.js +78 -0
- package/utils/debug-source.js.map +1 -0
- package/utils/debug.js +1 -59
- package/utils/debug.js.map +1 -1
- package/utils/index.android.d.ts +3 -1
- package/utils/index.android.js +37 -11
- package/utils/index.android.js.map +1 -1
- package/utils/index.d.ts +2 -14
- package/utils/index.ios.d.ts +4 -1
- package/utils/index.ios.js +32 -5
- package/utils/index.ios.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.d.ts +6 -4
- package/utils/layout-helper/index.ios.js +5 -5
- package/utils/layout-helper/index.ios.js.map +1 -1
- package/utils/layout-helper/layout-helper-common.d.ts +0 -9
- package/utils/layout-helper/layout-helper-common.js +1 -9
- package/utils/layout-helper/layout-helper-common.js.map +1 -1
- package/utils/layout-helper/layout-helper-shared.d.ts +9 -0
- package/utils/layout-helper/layout-helper-shared.js +13 -0
- package/utils/layout-helper/layout-helper-shared.js.map +1 -0
- package/utils/{android/index.d.ts → native-helper-for-android.d.ts} +4 -2
- package/utils/native-helper-for-android.js +273 -0
- package/utils/native-helper-for-android.js.map +1 -0
- package/utils/native-helper.android.d.ts +29 -5
- package/utils/native-helper.android.js +18 -131
- package/utils/native-helper.android.js.map +1 -1
- package/utils/native-helper.d.ts +206 -258
- package/utils/native-helper.ios.d.ts +72 -3
- package/utils/native-helper.ios.js +250 -3
- package/utils/native-helper.ios.js.map +1 -1
- package/utils/shared.d.ts +17 -0
- package/utils/shared.js +40 -0
- package/utils/shared.js.map +1 -0
- package/utils/utils-shared.d.ts +1 -0
- package/utils/utils-shared.js +8 -0
- package/utils/utils-shared.js.map +1 -0
- package/xhr/index.js +12 -13
- package/xhr/index.js.map +1 -1
- package/xml/index.d.ts +94 -98
- package/xml/index.js +58 -2
- package/xml/index.js.map +1 -1
- package/accessibility/accessibility-css-helper.d.ts +0 -1
- package/accessibility/accessibility-css-helper.js +0 -101
- package/accessibility/accessibility-css-helper.js.map +0 -1
- package/accessibility/accessibility-service-common.d.ts +0 -8
- package/accessibility/accessibility-service-common.js +0 -26
- package/accessibility/accessibility-service-common.js.map +0 -1
- package/accessibility/accessibility-service.android.d.ts +0 -6
- package/accessibility/accessibility-service.android.js +0 -103
- package/accessibility/accessibility-service.android.js.map +0 -1
- package/accessibility/accessibility-service.d.ts +0 -10
- package/accessibility/accessibility-service.ios.d.ts +0 -6
- package/accessibility/accessibility-service.ios.js +0 -61
- package/accessibility/accessibility-service.ios.js.map +0 -1
- package/accessibility/accessibility-types.d.ts +0 -224
- package/accessibility/accessibility-types.js +0 -222
- package/accessibility/accessibility-types.js.map +0 -1
- package/accessibility/font-scale-common.d.ts +0 -7
- package/accessibility/font-scale-common.js +0 -14
- package/accessibility/font-scale-common.js.map +0 -1
- package/accessibility/font-scale.android.d.ts +0 -5
- package/accessibility/font-scale.android.js +0 -55
- package/accessibility/font-scale.android.js.map +0 -1
- package/accessibility/font-scale.d.ts +0 -9
- package/accessibility/font-scale.ios.d.ts +0 -5
- package/accessibility/font-scale.ios.js +0 -89
- package/accessibility/font-scale.ios.js.map +0 -1
- package/accessibility/index.android.d.ts +0 -10
- package/accessibility/index.android.js +0 -577
- package/accessibility/index.android.js.map +0 -1
- package/accessibility/index.ios.d.ts +0 -9
- package/accessibility/index.ios.js +0 -229
- package/accessibility/index.ios.js.map +0 -1
- package/css/package.json +0 -36
- package/css-value/package.json +0 -23
- package/debugger/dom-node.d.ts +0 -27
- package/debugger/dom-node.js.map +0 -1
- package/ui/animation/animation-interfaces.js.map +0 -1
- package/ui/builder/xml2ui.d.ts +0 -134
- package/ui/builder/xml2ui.js +0 -397
- package/ui/builder/xml2ui.js.map +0 -1
- package/ui/frame/callbacks/activity-callbacks.d.ts +0 -19
- package/ui/frame/callbacks/activity-callbacks.js +0 -301
- package/ui/frame/callbacks/activity-callbacks.js.map +0 -1
- package/ui/frame/callbacks/fragment-callbacks.js.map +0 -1
- package/utils/android/index.js +0 -160
- package/utils/android/index.js.map +0 -1
- package/utils/ios/index.d.ts +0 -39
- package/utils/ios/index.js +0 -229
- package/utils/ios/index.js.map +0 -1
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
// Shared Length, FixedLength, and PercentLength helpers for styling modules.
|
|
2
|
+
// Only put platform-agnostic logic here.
|
|
3
|
+
import { layout } from '../../utils/layout-helper';
|
|
4
|
+
import { isCssWideKeyword } from '../core/properties/property-shared';
|
|
5
|
+
function equalsCommon(a, b) {
|
|
6
|
+
if (a == 'auto' || isCssWideKeyword(a)) {
|
|
7
|
+
return b == 'auto' || isCssWideKeyword(b);
|
|
8
|
+
}
|
|
9
|
+
if (b == 'auto' || isCssWideKeyword(b)) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
if (typeof a === 'number') {
|
|
13
|
+
if (typeof b === 'number') {
|
|
14
|
+
return a == b;
|
|
15
|
+
}
|
|
16
|
+
if (!b) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
return b.unit == 'dip' && a == b.value;
|
|
20
|
+
}
|
|
21
|
+
if (typeof b === 'number') {
|
|
22
|
+
return a ? a.unit == 'dip' && a.value == b : false;
|
|
23
|
+
}
|
|
24
|
+
if (!a || !b) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
return a.value == b.value && a.unit == b.unit;
|
|
28
|
+
}
|
|
29
|
+
function convertToStringCommon(length) {
|
|
30
|
+
if (length == 'auto' || isCssWideKeyword(length)) {
|
|
31
|
+
return 'auto';
|
|
32
|
+
}
|
|
33
|
+
if (typeof length === 'number') {
|
|
34
|
+
return length.toString();
|
|
35
|
+
}
|
|
36
|
+
let val = length.value;
|
|
37
|
+
if (length.unit === '%') {
|
|
38
|
+
val *= 100;
|
|
39
|
+
}
|
|
40
|
+
return val + length.unit;
|
|
41
|
+
}
|
|
42
|
+
function toDevicePixelsCommon(length, auto = Number.NaN, parentAvailableWidth = Number.NaN) {
|
|
43
|
+
if (length == 'auto' || isCssWideKeyword(length)) {
|
|
44
|
+
return auto;
|
|
45
|
+
}
|
|
46
|
+
if (typeof length === 'number') {
|
|
47
|
+
return layout.round(layout.toDevicePixels(length));
|
|
48
|
+
}
|
|
49
|
+
if (!length) {
|
|
50
|
+
return auto;
|
|
51
|
+
}
|
|
52
|
+
// @ts-ignore
|
|
53
|
+
switch (length.unit) {
|
|
54
|
+
case 'px':
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
return layout.round(length.value);
|
|
57
|
+
case '%':
|
|
58
|
+
// @ts-ignore
|
|
59
|
+
return layout.round(parentAvailableWidth * length.value);
|
|
60
|
+
case 'dip':
|
|
61
|
+
default:
|
|
62
|
+
// @ts-ignore
|
|
63
|
+
return layout.round(layout.toDevicePixels(length.value));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export var PercentLength;
|
|
67
|
+
(function (PercentLength) {
|
|
68
|
+
function parse(fromValue) {
|
|
69
|
+
if (fromValue == 'auto') {
|
|
70
|
+
return 'auto';
|
|
71
|
+
}
|
|
72
|
+
if (typeof fromValue === 'string') {
|
|
73
|
+
let stringValue = fromValue.trim();
|
|
74
|
+
const percentIndex = stringValue.indexOf('%');
|
|
75
|
+
if (percentIndex !== -1) {
|
|
76
|
+
let value;
|
|
77
|
+
// if only % or % is not last we treat it as invalid value.
|
|
78
|
+
if (percentIndex !== stringValue.length - 1 || percentIndex === 0) {
|
|
79
|
+
value = Number.NaN;
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
// Normalize result to values between -1 and 1
|
|
83
|
+
value = parseFloat(stringValue.substring(0, stringValue.length - 1).trim()) / 100;
|
|
84
|
+
}
|
|
85
|
+
if (isNaN(value) || !isFinite(value)) {
|
|
86
|
+
throw new Error(`Invalid value: ${fromValue}`);
|
|
87
|
+
}
|
|
88
|
+
return { unit: '%', value };
|
|
89
|
+
}
|
|
90
|
+
else if (stringValue.indexOf('px') !== -1) {
|
|
91
|
+
stringValue = stringValue.replace('px', '').trim();
|
|
92
|
+
const value = parseFloat(stringValue);
|
|
93
|
+
if (isNaN(value) || !isFinite(value)) {
|
|
94
|
+
throw new Error(`Invalid value: ${fromValue}`);
|
|
95
|
+
}
|
|
96
|
+
return { unit: 'px', value };
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
const value = parseFloat(stringValue);
|
|
100
|
+
if (isNaN(value) || !isFinite(value)) {
|
|
101
|
+
throw new Error(`Invalid value: ${fromValue}`);
|
|
102
|
+
}
|
|
103
|
+
return value;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
return fromValue;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
PercentLength.parse = parse;
|
|
111
|
+
PercentLength.equals = equalsCommon;
|
|
112
|
+
/**
|
|
113
|
+
* Converts PercentLengthType unit to device pixels.
|
|
114
|
+
* @param length The PercentLengthType to convert.
|
|
115
|
+
* @param auto Value to use for conversion of "auto". By default is Math.NaN.
|
|
116
|
+
* @param parentAvailableWidth Value to use as base when converting percent unit. By default is Math.NaN.
|
|
117
|
+
*/
|
|
118
|
+
PercentLength.toDevicePixels = toDevicePixelsCommon;
|
|
119
|
+
PercentLength.convertToString = convertToStringCommon;
|
|
120
|
+
})(PercentLength || (PercentLength = {}));
|
|
121
|
+
export var FixedLength;
|
|
122
|
+
(function (FixedLength) {
|
|
123
|
+
function parse(fromValue) {
|
|
124
|
+
if (typeof fromValue === 'string') {
|
|
125
|
+
let stringValue = fromValue.trim();
|
|
126
|
+
if (stringValue.indexOf('px') !== -1) {
|
|
127
|
+
stringValue = stringValue.replace('px', '').trim();
|
|
128
|
+
const value = parseFloat(stringValue);
|
|
129
|
+
if (isNaN(value) || !isFinite(value)) {
|
|
130
|
+
throw new Error(`Invalid value: ${stringValue}`);
|
|
131
|
+
}
|
|
132
|
+
return { unit: 'px', value };
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
const value = parseFloat(stringValue);
|
|
136
|
+
if (isNaN(value) || !isFinite(value)) {
|
|
137
|
+
throw new Error(`Invalid value: ${stringValue}`);
|
|
138
|
+
}
|
|
139
|
+
return value;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
return fromValue;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
FixedLength.parse = parse;
|
|
147
|
+
FixedLength.equals = equalsCommon;
|
|
148
|
+
/**
|
|
149
|
+
* Converts FixedLengthType unit to device pixels.
|
|
150
|
+
* @param length The FixedLengthType to convert.
|
|
151
|
+
*/
|
|
152
|
+
FixedLength.toDevicePixels = toDevicePixelsCommon;
|
|
153
|
+
FixedLength.convertToString = convertToStringCommon;
|
|
154
|
+
})(FixedLength || (FixedLength = {}));
|
|
155
|
+
export var Length;
|
|
156
|
+
(function (Length) {
|
|
157
|
+
function parse(fromValue) {
|
|
158
|
+
if (fromValue == 'auto') {
|
|
159
|
+
return 'auto';
|
|
160
|
+
}
|
|
161
|
+
return FixedLength.parse(fromValue);
|
|
162
|
+
}
|
|
163
|
+
Length.parse = parse;
|
|
164
|
+
Length.equals = equalsCommon;
|
|
165
|
+
/**
|
|
166
|
+
* Converts LengthType unit to device pixels.
|
|
167
|
+
* @param length The LengthType to convert.
|
|
168
|
+
* @param auto Value to use for conversion of "auto". By default is Math.NaN.
|
|
169
|
+
*/
|
|
170
|
+
Length.toDevicePixels = toDevicePixelsCommon;
|
|
171
|
+
Length.convertToString = convertToStringCommon;
|
|
172
|
+
})(Length || (Length = {}));
|
|
173
|
+
//# sourceMappingURL=length-shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"length-shared.js","sourceRoot":"","sources":["../../../../../packages/core/ui/styling/length-shared.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,yCAAyC;AAGzC,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAItE,SAAS,YAAY,CAAC,CAA8B,EAAE,CAA8B;IACnF,IAAI,CAAC,IAAI,MAAM,IAAI,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;QACxC,OAAO,CAAC,IAAI,MAAM,IAAI,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AAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBACtC,MAAM,IAAI,KAAK,CAAC,kBAAkB,WAAW,EAAE,CAAC,CAAC;gBAClD,CAAC;gBAED,OAAO,KAAK,CAAC;YACd,CAAC;QACF,CAAC;aAAM,CAAC;YACP,OAAO,SAAS,CAAC;QAClB,CAAC;IACF,CAAC;IAtBe,iBAAK,QAsBpB,CAAA;IACY,kBAAM,GAA8E,YAAY,CAAC;IAC9G;;;OAGG;IACU,0BAAc,GAEvB,oBAAoB,CAAC;IACZ,2BAAe,GAExB,qBAAqB,CAAC;AAC3B,CAAC,EAnCgB,WAAW,KAAX,WAAW,QAmC3B;AAED,MAAM,KAAW,MAAM,CAoBtB;AApBD,WAAiB,MAAM;IACtB,SAAgB,KAAK,CAAC,SAAwC;QAC7D,IAAI,SAAS,IAAI,MAAM,EAAE,CAAC;YACzB,OAAO,MAAM,CAAC;QACf,CAAC;QAED,OAAO,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACrC,CAAC;IANe,YAAK,QAMpB,CAAA;IACY,aAAM,GAAoE,YAAY,CAAC;IACpG;;;;OAIG;IACU,qBAAc,GAEvB,oBAAoB,CAAC;IACZ,sBAAe,GAExB,qBAAqB,CAAC;AAC3B,CAAC,EApBgB,MAAM,KAAN,MAAM,QAoBtB"}
|
|
@@ -6,7 +6,7 @@ import { LinearGradient } from '../../styling/linear-gradient';
|
|
|
6
6
|
import { Observable } from '../../../data/observable';
|
|
7
7
|
import { FlexDirection, FlexWrap, JustifyContent, AlignItems, AlignContent, Order, FlexGrow, FlexShrink, FlexWrapBefore, AlignSelf, FlexFlow, Flex } from '../../layouts/flexbox-layout';
|
|
8
8
|
import { CoreTypes } from '../../../core-types';
|
|
9
|
-
import { AccessibilityLiveRegion, AccessibilityRole, AccessibilityState } from '../../../accessibility
|
|
9
|
+
import { AccessibilityLiveRegion, AccessibilityRole, AccessibilityState } from '../../../accessibility';
|
|
10
10
|
import { ShadowCSSValues } from '../css-shadow';
|
|
11
11
|
import { StrokeCSSValues } from '../css-stroke';
|
|
12
12
|
import { ClipPathFunction } from '../clip-path-function';
|
|
@@ -1,116 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Color } from '../../color';
|
|
3
|
-
import { CssProperty, CssAnimationProperty, ShorthandProperty, InheritedCssProperty } from '../core/properties';
|
|
1
|
+
import { CssProperty, CssAnimationProperty, InheritedCssProperty } from '../core/properties';
|
|
4
2
|
import { Style } from './style';
|
|
3
|
+
import { Color } from '../../color';
|
|
5
4
|
import { Font, FontStyleType, FontWeightType, FontVariationSettingsType } from './font';
|
|
6
5
|
import { Background } from './background';
|
|
7
|
-
import {
|
|
6
|
+
import { CoreTypes } from '../../core-types';
|
|
8
7
|
import { LinearGradient } from './linear-gradient';
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
export const
|
|
47
|
-
|
|
48
|
-
export const
|
|
49
|
-
export const
|
|
50
|
-
export const
|
|
51
|
-
export const
|
|
52
|
-
export const
|
|
53
|
-
|
|
54
|
-
export const
|
|
55
|
-
export const
|
|
56
|
-
|
|
57
|
-
export const
|
|
58
|
-
export const
|
|
59
|
-
export const
|
|
60
|
-
export const
|
|
61
|
-
export const
|
|
62
|
-
export const
|
|
63
|
-
|
|
64
|
-
export const borderColorProperty: ShorthandProperty<Style, string | Color>;
|
|
65
|
-
export const borderTopColorProperty: CssProperty<Style, Color>;
|
|
66
|
-
export const borderRightColorProperty: CssProperty<Style, Color>;
|
|
67
|
-
export const borderBottomColorProperty: CssProperty<Style, Color>;
|
|
68
|
-
export const borderLeftColorProperty: CssProperty<Style, Color>;
|
|
69
|
-
|
|
70
|
-
export const borderWidthProperty: ShorthandProperty<Style, string | CoreTypes.LengthType>;
|
|
71
|
-
export const borderTopWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
72
|
-
export const borderRightWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
73
|
-
export const borderBottomWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
74
|
-
export const borderLeftWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
75
|
-
|
|
76
|
-
export const borderRadiusProperty: ShorthandProperty<Style, string | CoreTypes.LengthType>;
|
|
77
|
-
export const borderTopLeftRadiusProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
78
|
-
export const borderTopRightRadiusProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
79
|
-
export const borderBottomRightRadiusProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
80
|
-
export const borderBottomLeftRadiusProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
81
|
-
|
|
82
|
-
export const zIndexProperty: CssProperty<Style, number>;
|
|
83
|
-
export const visibilityProperty: CssProperty<Style, CoreTypes.VisibilityType>;
|
|
84
|
-
export const opacityProperty: CssAnimationProperty<Style, number>;
|
|
85
|
-
|
|
86
|
-
export const minWidthProperty: CssProperty<Style, CoreTypes.dip | CoreTypes.LengthDipUnit | CoreTypes.LengthPxUnit>;
|
|
87
|
-
export const minHeightProperty: CssProperty<Style, CoreTypes.dip | CoreTypes.LengthDipUnit | CoreTypes.LengthPxUnit>;
|
|
88
|
-
export const widthProperty: CssAnimationProperty<Style, CoreTypes.PercentLengthType>;
|
|
89
|
-
export const heightProperty: CssAnimationProperty<Style, CoreTypes.PercentLengthType>;
|
|
90
|
-
export const marginProperty: ShorthandProperty<Style, string | CoreTypes.PercentLengthType>;
|
|
91
|
-
export const marginLeftProperty: CssProperty<Style, CoreTypes.PercentLengthType>;
|
|
92
|
-
export const marginRightProperty: CssProperty<Style, CoreTypes.PercentLengthType>;
|
|
93
|
-
export const marginTopProperty: CssProperty<Style, CoreTypes.PercentLengthType>;
|
|
94
|
-
export const marginBottomProperty: CssProperty<Style, CoreTypes.PercentLengthType>;
|
|
95
|
-
|
|
96
|
-
export const paddingProperty: ShorthandProperty<Style, string | CoreTypes.LengthType>;
|
|
97
|
-
export const paddingLeftProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
98
|
-
export const paddingRightProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
99
|
-
export const paddingTopProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
100
|
-
export const paddingBottomProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
101
|
-
|
|
102
|
-
export const horizontalAlignmentProperty: CssProperty<Style, CoreTypes.HorizontalAlignmentType>;
|
|
103
|
-
export const verticalAlignmentProperty: CssProperty<Style, CoreTypes.VerticalAlignmentType>;
|
|
104
|
-
|
|
105
|
-
export const fontSizeProperty: InheritedCssProperty<Style, number>;
|
|
106
|
-
export const fontFamilyProperty: InheritedCssProperty<Style, string>;
|
|
107
|
-
export const fontStyleProperty: InheritedCssProperty<Style, FontStyleType>;
|
|
108
|
-
export const fontWeightProperty: InheritedCssProperty<Style, FontWeightType>;
|
|
109
|
-
|
|
110
|
-
export const backgroundInternalProperty: CssProperty<Style, Background>;
|
|
111
|
-
export const fontInternalProperty: InheritedCssProperty<Style, Font>;
|
|
112
|
-
export const fontScaleInternalProperty: InheritedCssProperty<Style, number>;
|
|
113
|
-
export const fontVariationSettingsProperty: InheritedCssProperty<Style, FontVariationSettingsType[]>;
|
|
114
|
-
|
|
115
|
-
export const androidElevationProperty: CssProperty<Style, number>;
|
|
116
|
-
export const androidDynamicElevationOffsetProperty: CssProperty<Style, number>;
|
|
8
|
+
import { ClipPathFunction } from './clip-path-function';
|
|
9
|
+
export declare const minWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
10
|
+
export declare const minHeightProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
11
|
+
export declare const widthProperty: CssAnimationProperty<Style, CoreTypes.PercentLengthType>;
|
|
12
|
+
export declare const heightProperty: CssAnimationProperty<Style, CoreTypes.PercentLengthType>;
|
|
13
|
+
export declare const marginLeftProperty: CssProperty<Style, CoreTypes.PercentLengthType>;
|
|
14
|
+
export declare const marginRightProperty: CssProperty<Style, CoreTypes.PercentLengthType>;
|
|
15
|
+
export declare const marginTopProperty: CssProperty<Style, CoreTypes.PercentLengthType>;
|
|
16
|
+
export declare const marginBottomProperty: CssProperty<Style, CoreTypes.PercentLengthType>;
|
|
17
|
+
export declare const paddingLeftProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
18
|
+
export declare const paddingRightProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
19
|
+
export declare const paddingTopProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
20
|
+
export declare const paddingBottomProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
21
|
+
export declare const horizontalAlignmentProperty: CssProperty<Style, CoreTypes.HorizontalAlignmentType>;
|
|
22
|
+
export declare const verticalAlignmentProperty: CssProperty<Style, CoreTypes.VerticalAlignmentTextType>;
|
|
23
|
+
export declare const rotateProperty: CssAnimationProperty<Style, number>;
|
|
24
|
+
export declare const rotateXProperty: CssAnimationProperty<Style, number>;
|
|
25
|
+
export declare const rotateYProperty: CssAnimationProperty<Style, number>;
|
|
26
|
+
export declare const perspectiveProperty: CssAnimationProperty<Style, number>;
|
|
27
|
+
export declare const scaleXProperty: CssAnimationProperty<Style, number>;
|
|
28
|
+
export declare const scaleYProperty: CssAnimationProperty<Style, number>;
|
|
29
|
+
export declare const translateXProperty: CssAnimationProperty<Style, CoreTypes.FixedLengthType>;
|
|
30
|
+
export declare const translateYProperty: CssAnimationProperty<Style, CoreTypes.FixedLengthType>;
|
|
31
|
+
export declare const backgroundInternalProperty: CssProperty<Style, Background>;
|
|
32
|
+
export declare const backgroundImageProperty: CssProperty<Style, string | LinearGradient>;
|
|
33
|
+
export declare const backgroundColorProperty: CssAnimationProperty<Style, Color>;
|
|
34
|
+
export declare const backgroundRepeatProperty: CssProperty<Style, CoreTypes.BackgroundRepeatType>;
|
|
35
|
+
export declare const backgroundSizeProperty: CssProperty<Style, string>;
|
|
36
|
+
export declare const backgroundPositionProperty: CssProperty<Style, string>;
|
|
37
|
+
export declare const borderTopColorProperty: CssProperty<Style, Color>;
|
|
38
|
+
export declare const borderRightColorProperty: CssProperty<Style, Color>;
|
|
39
|
+
export declare const borderBottomColorProperty: CssProperty<Style, Color>;
|
|
40
|
+
export declare const borderLeftColorProperty: CssProperty<Style, Color>;
|
|
41
|
+
export declare const borderTopWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
42
|
+
export declare const borderRightWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
43
|
+
export declare const borderBottomWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
44
|
+
export declare const borderLeftWidthProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
45
|
+
export declare const borderTopLeftRadiusProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
46
|
+
export declare const borderTopRightRadiusProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
47
|
+
export declare const borderBottomRightRadiusProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
48
|
+
export declare const borderBottomLeftRadiusProperty: CssProperty<Style, CoreTypes.LengthType>;
|
|
49
|
+
export declare const clipPathProperty: CssProperty<Style, string | ClipPathFunction>;
|
|
50
|
+
export declare const zIndexProperty: CssProperty<Style, number>;
|
|
51
|
+
export declare const opacityProperty: CssAnimationProperty<Style, number>;
|
|
52
|
+
export declare const colorProperty: InheritedCssProperty<Style, Color>;
|
|
53
|
+
export declare const fontInternalProperty: CssProperty<Style, Font>;
|
|
54
|
+
export declare const fontFamilyProperty: InheritedCssProperty<Style, string>;
|
|
55
|
+
export declare const fontScaleInternalProperty: InheritedCssProperty<Style, number>;
|
|
56
|
+
export declare const fontSizeProperty: InheritedCssProperty<Style, number>;
|
|
57
|
+
export declare const fontStyleProperty: InheritedCssProperty<Style, FontStyleType>;
|
|
58
|
+
export declare const fontWeightProperty: InheritedCssProperty<Style, FontWeightType>;
|
|
59
|
+
export declare const fontVariationSettingsProperty: InheritedCssProperty<Style, FontVariationSettingsType[]>;
|
|
60
|
+
export declare const visibilityProperty: CssProperty<Style, CoreTypes.VisibilityType>;
|
|
61
|
+
export declare const androidElevationProperty: CssProperty<Style, number>;
|
|
62
|
+
export declare const androidDynamicElevationOffsetProperty: CssProperty<Style, number>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CssProperty, CssAnimationProperty, ShorthandProperty, InheritedCssProperty } from '../core/properties';
|
|
2
|
+
import { unsetValue, isCssWideKeyword } from '../core/properties/property-shared';
|
|
2
3
|
import { Style } from './style';
|
|
3
4
|
import { Color } from '../../color';
|
|
4
5
|
import { Font, parseFont, FontStyle, FontWeight, FontVariationSettings } from './font';
|
|
@@ -6,6 +7,7 @@ import { Background } from './background';
|
|
|
6
7
|
import { layout } from '../../utils';
|
|
7
8
|
import { Trace } from '../../trace';
|
|
8
9
|
import { CoreTypes } from '../../core-types';
|
|
10
|
+
import { Length, FixedLength, PercentLength } from './length-shared';
|
|
9
11
|
import { parseBackground } from '../../css/parser';
|
|
10
12
|
import { LinearGradient } from './linear-gradient';
|
|
11
13
|
import { parseCSSShadow } from './css-shadow';
|
|
@@ -58,108 +60,20 @@ function toDevicePixelsCommon(length, auto = Number.NaN, parentAvailableWidth =
|
|
|
58
60
|
if (!length) {
|
|
59
61
|
return auto;
|
|
60
62
|
}
|
|
63
|
+
// @ts-ignore
|
|
61
64
|
switch (length.unit) {
|
|
62
65
|
case 'px':
|
|
66
|
+
// @ts-ignore
|
|
63
67
|
return layout.round(length.value);
|
|
64
68
|
case '%':
|
|
69
|
+
// @ts-ignore
|
|
65
70
|
return layout.round(parentAvailableWidth * length.value);
|
|
66
71
|
case 'dip':
|
|
67
72
|
default:
|
|
73
|
+
// @ts-ignore
|
|
68
74
|
return layout.round(layout.toDevicePixels(length.value));
|
|
69
75
|
}
|
|
70
76
|
}
|
|
71
|
-
export var PercentLength;
|
|
72
|
-
(function (PercentLength) {
|
|
73
|
-
function parse(fromValue) {
|
|
74
|
-
if (fromValue == 'auto') {
|
|
75
|
-
return 'auto';
|
|
76
|
-
}
|
|
77
|
-
if (typeof fromValue === 'string') {
|
|
78
|
-
let stringValue = fromValue.trim();
|
|
79
|
-
const percentIndex = stringValue.indexOf('%');
|
|
80
|
-
if (percentIndex !== -1) {
|
|
81
|
-
let value;
|
|
82
|
-
// if only % or % is not last we treat it as invalid value.
|
|
83
|
-
if (percentIndex !== stringValue.length - 1 || percentIndex === 0) {
|
|
84
|
-
value = Number.NaN;
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
// Normalize result to values between -1 and 1
|
|
88
|
-
value = parseFloat(stringValue.substring(0, stringValue.length - 1).trim()) / 100;
|
|
89
|
-
}
|
|
90
|
-
if (isNaN(value) || !isFinite(value)) {
|
|
91
|
-
throw new Error(`Invalid value: ${fromValue}`);
|
|
92
|
-
}
|
|
93
|
-
return { unit: '%', value };
|
|
94
|
-
}
|
|
95
|
-
else if (stringValue.indexOf('px') !== -1) {
|
|
96
|
-
stringValue = stringValue.replace('px', '').trim();
|
|
97
|
-
const value = parseFloat(stringValue);
|
|
98
|
-
if (isNaN(value) || !isFinite(value)) {
|
|
99
|
-
throw new Error(`Invalid value: ${fromValue}`);
|
|
100
|
-
}
|
|
101
|
-
return { unit: 'px', value };
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
const value = parseFloat(stringValue);
|
|
105
|
-
if (isNaN(value) || !isFinite(value)) {
|
|
106
|
-
throw new Error(`Invalid value: ${fromValue}`);
|
|
107
|
-
}
|
|
108
|
-
return value;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
return fromValue;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
PercentLength.parse = parse;
|
|
116
|
-
PercentLength.equals = equalsCommon;
|
|
117
|
-
PercentLength.toDevicePixels = toDevicePixelsCommon;
|
|
118
|
-
PercentLength.convertToString = convertToStringCommon;
|
|
119
|
-
})(PercentLength || (PercentLength = {}));
|
|
120
|
-
export var FixedLength;
|
|
121
|
-
(function (FixedLength) {
|
|
122
|
-
function parse(fromValue) {
|
|
123
|
-
if (typeof fromValue === 'string') {
|
|
124
|
-
let stringValue = fromValue.trim();
|
|
125
|
-
if (stringValue.indexOf('px') !== -1) {
|
|
126
|
-
stringValue = stringValue.replace('px', '').trim();
|
|
127
|
-
const value = parseFloat(stringValue);
|
|
128
|
-
if (isNaN(value) || !isFinite(value)) {
|
|
129
|
-
throw new Error(`Invalid value: ${stringValue}`);
|
|
130
|
-
}
|
|
131
|
-
return { unit: 'px', value };
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
const value = parseFloat(stringValue);
|
|
135
|
-
if (isNaN(value) || !isFinite(value)) {
|
|
136
|
-
throw new Error(`Invalid value: ${stringValue}`);
|
|
137
|
-
}
|
|
138
|
-
return value;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
return fromValue;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
FixedLength.parse = parse;
|
|
146
|
-
FixedLength.equals = equalsCommon;
|
|
147
|
-
FixedLength.toDevicePixels = toDevicePixelsCommon;
|
|
148
|
-
FixedLength.convertToString = convertToStringCommon;
|
|
149
|
-
})(FixedLength || (FixedLength = {}));
|
|
150
|
-
export var Length;
|
|
151
|
-
(function (Length) {
|
|
152
|
-
function parse(fromValue) {
|
|
153
|
-
if (fromValue == 'auto') {
|
|
154
|
-
return 'auto';
|
|
155
|
-
}
|
|
156
|
-
return FixedLength.parse(fromValue);
|
|
157
|
-
}
|
|
158
|
-
Length.parse = parse;
|
|
159
|
-
Length.equals = equalsCommon;
|
|
160
|
-
Length.toDevicePixels = toDevicePixelsCommon;
|
|
161
|
-
Length.convertToString = convertToStringCommon;
|
|
162
|
-
})(Length || (Length = {}));
|
|
163
77
|
function isNonNegativeFiniteNumber(value) {
|
|
164
78
|
return isFinite(value) && !isNaN(value) && value >= 0;
|
|
165
79
|
}
|