@nativescript/core 8.9.0-alpha.3 → 8.9.0-napi-es5.0
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 +23 -16
- package/abortcontroller/abortsignal.js.map +1 -1
- package/abortcontroller/index.js +20 -14
- 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 +23 -23
- package/accessibility/accessibility-properties.js.map +1 -1
- package/accessibility/accessibility-service-common.js +22 -12
- package/accessibility/accessibility-service-common.js.map +1 -1
- package/accessibility/accessibility-service.android.js +39 -27
- package/accessibility/accessibility-service.android.js.map +1 -1
- package/accessibility/accessibility-service.ios.js +17 -14
- 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 +8 -7
- package/accessibility/font-scale.android.js.map +1 -1
- package/accessibility/font-scale.ios.js +10 -9
- package/accessibility/font-scale.ios.js.map +1 -1
- package/accessibility/index.android.js +83 -77
- package/accessibility/index.android.js.map +1 -1
- package/accessibility/index.ios.js +36 -34
- 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 +214 -196
- 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 +149 -110
- package/application/application.android.js.map +1 -1
- package/application/application.ios.js +197 -162
- 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 +200 -157
- package/color/color-common.js.map +1 -1
- package/color/index.android.js +14 -4
- package/color/index.android.js.map +1 -1
- package/color/index.ios.js +24 -14
- 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 +24 -20
- package/console/index.js.map +1 -1
- package/core-types/index.d.ts +2 -2
- package/core-types/index.js +41 -41
- package/core-types/index.js.map +1 -1
- package/css/CSS3Parser.js +106 -104
- package/css/CSS3Parser.js.map +1 -1
- package/css/CSSNativeScript.js +34 -29
- package/css/CSSNativeScript.js.map +1 -1
- package/css/css-tree-parser.js.map +1 -1
- package/css/parser.js +179 -158
- 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 +29 -27
- package/css-mediaquery/index.js.map +1 -1
- package/data/observable/index.d.ts +1 -0
- package/data/observable/index.js +124 -114
- package/data/observable/index.js.map +1 -1
- package/data/observable-array/index.js +176 -119
- package/data/observable-array/index.js.map +1 -1
- package/data/virtual-array/index.js +74 -61
- package/data/virtual-array/index.js.map +1 -1
- package/debugger/InspectorBackendCommands.js +161 -137
- 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 +73 -61
- 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 +30 -25
- package/debugger/webinspector-css.js.map +1 -1
- package/debugger/webinspector-dom.js +43 -38
- package/debugger/webinspector-dom.js.map +1 -1
- package/debugger/webinspector-network.android.js +132 -103
- package/debugger/webinspector-network.android.js.map +1 -1
- package/debugger/webinspector-network.ios.js +128 -100
- package/debugger/webinspector-network.ios.js.map +1 -1
- package/file-system/file-system-access.android.js +421 -414
- package/file-system/file-system-access.android.js.map +1 -1
- package/file-system/file-system-access.ios.js +215 -205
- package/file-system/file-system-access.ios.js.map +1 -1
- package/file-system/index.js +372 -294
- package/file-system/index.js.map +1 -1
- package/fps-meter/fps-native.android.js +18 -15
- package/fps-meter/fps-native.android.js.map +1 -1
- package/fps-meter/fps-native.ios.js +11 -9
- 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 +117 -91
- 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 +54 -53
- package/http/http-request/index.android.js.map +1 -1
- package/http/http-request/index.ios.js +58 -56
- 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 +37 -25
- package/image-asset/image-asset-common.js.map +1 -1
- package/image-asset/index.android.js +25 -17
- package/image-asset/index.android.js.map +1 -1
- package/image-asset/index.ios.js +35 -25
- 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.d.ts +3 -2
- package/image-source/index.android.js +189 -156
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.d.ts +5 -0
- package/image-source/index.ios.d.ts +3 -2
- package/image-source/index.ios.js +211 -178
- package/image-source/index.ios.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +8 -4
- package/index.js.map +1 -1
- package/matrix/index.js +27 -17
- package/matrix/index.js.map +1 -1
- package/media-query-list/index.js +87 -61
- package/media-query-list/index.js.map +1 -1
- package/module-name-resolver/index.js +24 -21
- 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 +107 -68
- package/platform/device/index.android.js.map +1 -1
- package/platform/device/index.ios.js +101 -62
- package/platform/device/index.ios.js.map +1 -1
- package/platform/screen/index.android.js +63 -32
- package/platform/screen/index.android.js.map +1 -1
- package/platform/screen/index.ios.js +60 -29
- package/platform/screen/index.ios.js.map +1 -1
- package/platforms/android/widgets-release.aar +0 -0
- package/platforms/android/winter_tc-release.aar +0 -0
- package/platforms/ios/{NSCWinterCG.xcframework → NSCWinterTC.xcframework}/Info.plist +22 -22
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework → NSCWinterTC.xcframework/ios-arm64/NSCWinterTC.framework}/Headers/NSCCrypto.h +1 -1
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64/NSCWinterTC.framework/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Headers/NSString+WinterCG.h → NSCWinterTC.xcframework/ios-arm64/NSCWinterTC.framework/Headers/NSString+WinterTC.h} +3 -3
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework → NSCWinterTC.xcframework/ios-arm64/NSCWinterTC.framework}/Info.plist +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64/NSCWinterTC.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/NSCWinterCG → NSCWinterTC.xcframework/ios-arm64/NSCWinterTC.framework/NSCWinterTC} +0 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM → NSCWinterTC.xcframework/ios-arm64/dSYMs/NSCWinterTC.framework.dSYM}/Contents/Info.plist +1 -1
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/DWARF/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterTC.yml +40 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework}/Headers/NSCCrypto.h +1 -1
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Headers/NSString+WinterCG.h → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSString+WinterTC.h} +3 -3
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/NSCWinterCG → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/NSCWinterTC} +0 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework}/Resources/Info.plist +10 -10
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A}/Headers/NSCCrypto.h +1 -1
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSString+WinterCG.h → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A/Headers/NSString+WinterTC.h} +3 -3
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A/Modules/module.modulemap +6 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/NSCWinterCG → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A/NSCWinterTC} +0 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A}/Resources/Info.plist +10 -10
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/Current/NSCWinterCG → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/NSCWinterTC} +0 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM → NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterTC.framework.dSYM}/Contents/Info.plist +1 -1
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/DWARF/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterTC.yml +40 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterTC.yml +40 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework → NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework}/Headers/NSCCrypto.h +1 -1
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSString+WinterCG.h → NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework/Headers/NSString+WinterTC.h} +3 -3
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework → NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework}/Info.plist +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/NSCWinterCG → NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework/NSCWinterTC} +0 -0
- package/platforms/ios/{NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework → NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework}/_CodeSignature/CodeResources +13 -13
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64/dSYMs/NSCWinterCG.framework.dSYM → NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM}/Contents/Info.plist +1 -1
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/DWARF/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterTC.yml +40 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterTC.yml +40 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64/NSCWinterTC.framework/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64/NSCWinterTC.framework/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64/NSCWinterTC.framework/Headers/NSString+WinterTC.h +21 -0
- package/platforms/ios/{NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework → NSCWinterTC.xcframework/xros-arm64/NSCWinterTC.framework}/Info.plist +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64/NSCWinterTC.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/{NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/NSCWinterCG → NSCWinterTC.xcframework/xros-arm64/NSCWinterTC.framework/NSCWinterTC} +0 -0
- package/platforms/ios/{NSCWinterCG.xcframework/xros-arm64/dSYMs/NSCWinterCG.framework.dSYM → NSCWinterTC.xcframework/xros-arm64/dSYMs/NSCWinterTC.framework.dSYM}/Contents/Info.plist +1 -1
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/DWARF/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterTC.yml +40 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/NSCWinterTC.framework/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/NSCWinterTC.framework/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/NSCWinterTC.framework/Headers/NSString+WinterTC.h +21 -0
- package/platforms/ios/{NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework → NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/NSCWinterTC.framework}/Info.plist +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/NSCWinterTC.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/{NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/NSCWinterCG → NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/NSCWinterTC.framework/NSCWinterTC} +0 -0
- package/platforms/ios/{NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework → NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/NSCWinterTC.framework}/_CodeSignature/CodeResources +13 -13
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM/Contents/Info.plist +20 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/DWARF/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterTC.yml +40 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterTC.yml +40 -0
- package/platforms/ios/src/NativeScriptMainWindow.swift +24 -7
- package/platforms/ios/src/UIView+NativeScript.m +2 -4
- package/profiling/index.js +47 -40
- package/profiling/index.js.map +1 -1
- package/text/text-common.js +49 -36
- package/text/text-common.js.map +1 -1
- package/timer/index.android.js +30 -20
- package/timer/index.android.js.map +1 -1
- package/timer/index.ios.js +22 -12
- package/timer/index.ios.js.map +1 -1
- package/trace/index.js +36 -26
- package/trace/index.js.map +1 -1
- package/ui/action-bar/action-bar-common.js +252 -193
- package/ui/action-bar/action-bar-common.js.map +1 -1
- package/ui/action-bar/index.android.d.ts +1 -0
- package/ui/action-bar/index.android.js +212 -167
- package/ui/action-bar/index.android.js.map +1 -1
- package/ui/action-bar/index.d.ts +33 -0
- package/ui/action-bar/index.ios.d.ts +7 -2
- package/ui/action-bar/index.ios.js +337 -193
- package/ui/action-bar/index.ios.js.map +1 -1
- package/ui/activity-indicator/activity-indicator-common.js +11 -6
- package/ui/activity-indicator/activity-indicator-common.js.map +1 -1
- package/ui/activity-indicator/index.android.js +26 -20
- package/ui/activity-indicator/index.android.js.map +1 -1
- package/ui/activity-indicator/index.d.ts +4 -0
- package/ui/activity-indicator/index.ios.js +31 -23
- package/ui/activity-indicator/index.ios.js.map +1 -1
- package/ui/animation/animation-common.d.ts +1 -8
- package/ui/animation/animation-common.js +50 -51
- package/ui/animation/animation-common.js.map +1 -1
- package/ui/animation/animation-interfaces.d.ts +11 -0
- package/ui/animation/animation-interfaces.js +14 -1
- package/ui/animation/animation-interfaces.js.map +1 -1
- package/ui/animation/index.android.d.ts +2 -2
- package/ui/animation/index.android.js +96 -92
- package/ui/animation/index.android.js.map +1 -1
- package/ui/animation/index.d.ts +0 -13
- package/ui/animation/index.ios.d.ts +2 -2
- package/ui/animation/index.ios.js +195 -229
- package/ui/animation/index.ios.js.map +1 -1
- package/ui/animation/keyframe-animation.js +89 -67
- 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 +59 -54
- package/ui/builder/index.js.map +1 -1
- package/ui/builder/xml2ui.js +158 -128
- package/ui/builder/xml2ui.js.map +1 -1
- package/ui/button/button-common.js +25 -18
- package/ui/button/button-common.js.map +1 -1
- package/ui/button/index.android.d.ts +1 -1
- package/ui/button/index.android.js +93 -80
- package/ui/button/index.android.js.map +1 -1
- package/ui/button/index.d.ts +6 -0
- package/ui/button/index.ios.js +118 -101
- package/ui/button/index.ios.js.map +1 -1
- package/ui/content-view/index.d.ts +9 -0
- package/ui/content-view/index.js +78 -60
- package/ui/content-view/index.js.map +1 -1
- package/ui/core/bindable/bindable-expressions.js +101 -93
- 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 +141 -136
- package/ui/core/bindable/index.js.map +1 -1
- package/ui/core/control-state-change/index.android.d.ts +2 -2
- package/ui/core/control-state-change/index.android.js +7 -5
- package/ui/core/control-state-change/index.android.js.map +1 -1
- package/ui/core/control-state-change/index.d.ts +4 -2
- package/ui/core/control-state-change/index.ios.d.ts +3 -7
- package/ui/core/control-state-change/index.ios.js +29 -42
- package/ui/core/control-state-change/index.ios.js.map +1 -1
- package/ui/core/properties/index.js +489 -440
- package/ui/core/properties/index.js.map +1 -1
- package/ui/core/view/index.android.d.ts +2 -7
- package/ui/core/view/index.android.js +387 -352
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.d.ts +238 -14
- package/ui/core/view/index.ios.d.ts +3 -13
- package/ui/core/view/index.ios.js +411 -367
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.d.ts +11 -15
- package/ui/core/view/view-common.js +951 -654
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.android.js +19 -15
- package/ui/core/view/view-helper/index.android.js.map +1 -1
- package/ui/core/view/view-helper/index.d.ts +3 -3
- package/ui/core/view/view-helper/index.ios.d.ts +3 -18
- package/ui/core/view/view-helper/index.ios.js +85 -81
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view/view-helper/view-helper-common.js +49 -44
- package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
- package/ui/core/view-base/index.d.ts +107 -4
- package/ui/core/view-base/index.js +452 -349
- package/ui/core/view-base/index.js.map +1 -1
- package/ui/core/weak-event-listener/index.js +26 -25
- package/ui/core/weak-event-listener/index.js.map +1 -1
- package/ui/date-picker/date-picker-common.d.ts +1 -0
- package/ui/date-picker/date-picker-common.js +35 -29
- package/ui/date-picker/date-picker-common.js.map +1 -1
- package/ui/date-picker/index.android.js +51 -43
- package/ui/date-picker/index.android.js.map +1 -1
- package/ui/date-picker/index.d.ts +30 -0
- package/ui/date-picker/index.ios.js +61 -51
- 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 +98 -86
- package/ui/dialogs/index.android.js.map +1 -1
- package/ui/dialogs/index.ios.js +80 -67
- package/ui/dialogs/index.ios.js.map +1 -1
- package/ui/editable-text-base/editable-text-base-common.d.ts +1 -2
- package/ui/editable-text-base/editable-text-base-common.js +44 -32
- package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
- package/ui/editable-text-base/index.android.js +112 -106
- package/ui/editable-text-base/index.android.js.map +1 -1
- package/ui/editable-text-base/index.d.ts +42 -0
- package/ui/editable-text-base/index.ios.js +53 -47
- package/ui/editable-text-base/index.ios.js.map +1 -1
- package/ui/embedding/index.android.js +3 -2
- 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 +123 -118
- package/ui/frame/callbacks/activity-callbacks.js.map +1 -1
- package/ui/frame/callbacks/fragment-callbacks.js +141 -139
- 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 +114 -105
- package/ui/frame/fragment.transitions.android.js.map +1 -1
- package/ui/frame/frame-common.d.ts +4 -3
- package/ui/frame/frame-common.js +288 -252
- 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 +291 -239
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.d.ts +40 -3
- package/ui/frame/index.ios.js +167 -133
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/gestures/gestures-common.d.ts +22 -0
- package/ui/gestures/gestures-common.js +51 -15
- package/ui/gestures/gestures-common.js.map +1 -1
- package/ui/gestures/index.android.d.ts +1 -1
- package/ui/gestures/index.android.js +124 -109
- package/ui/gestures/index.android.js.map +1 -1
- package/ui/gestures/index.ios.d.ts +1 -1
- package/ui/gestures/index.ios.js +121 -108
- package/ui/gestures/index.ios.js.map +1 -1
- package/ui/gestures/touch-manager.d.ts +1 -1
- package/ui/gestures/touch-manager.js +48 -43
- package/ui/gestures/touch-manager.js.map +1 -1
- package/ui/html-view/html-view-common.d.ts +1 -0
- package/ui/html-view/html-view-common.js +14 -9
- package/ui/html-view/html-view-common.js.map +1 -1
- package/ui/html-view/index.android.js +43 -37
- package/ui/html-view/index.android.js.map +1 -1
- package/ui/html-view/index.d.ts +16 -2
- package/ui/html-view/index.ios.js +73 -62
- package/ui/html-view/index.ios.js.map +1 -1
- package/ui/image/image-common.d.ts +2 -0
- package/ui/image/image-common.js +59 -47
- package/ui/image/image-common.js.map +1 -1
- package/ui/image/index.android.js +59 -54
- package/ui/image/index.android.js.map +1 -1
- package/ui/image/index.d.ts +43 -1
- package/ui/image/index.ios.js +72 -65
- package/ui/image/index.ios.js.map +1 -1
- package/ui/image/symbol-effects-common.js +6 -2
- package/ui/image/symbol-effects-common.js.map +1 -1
- package/ui/image/symbol-effects.android.js +10 -4
- package/ui/image/symbol-effects.android.js.map +1 -1
- package/ui/image/symbol-effects.ios.js +11 -7
- package/ui/image/symbol-effects.ios.js.map +1 -1
- package/ui/image-cache/image-cache-common.js +61 -57
- package/ui/image-cache/image-cache-common.js.map +1 -1
- package/ui/image-cache/index.android.js +27 -23
- package/ui/image-cache/index.android.js.map +1 -1
- package/ui/image-cache/index.ios.js +29 -24
- package/ui/image-cache/index.ios.js.map +1 -1
- package/ui/index.d.ts +3 -1
- package/ui/index.js +1 -1
- package/ui/index.js.map +1 -1
- package/ui/label/index.android.js +38 -29
- package/ui/label/index.android.js.map +1 -1
- package/ui/label/index.d.ts +4 -0
- package/ui/label/index.ios.js +102 -89
- package/ui/label/index.ios.js.map +1 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.js +30 -25
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
- package/ui/layouts/absolute-layout/index.android.js +12 -6
- package/ui/layouts/absolute-layout/index.android.js.map +1 -1
- package/ui/layouts/absolute-layout/index.d.ts +2 -0
- package/ui/layouts/absolute-layout/index.ios.js +40 -32
- package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
- package/ui/layouts/dock-layout/dock-layout-common.js +21 -16
- package/ui/layouts/dock-layout/dock-layout-common.js.map +1 -1
- package/ui/layouts/dock-layout/index.android.js +17 -11
- package/ui/layouts/dock-layout/index.android.js.map +1 -1
- package/ui/layouts/dock-layout/index.d.ts +5 -1
- package/ui/layouts/dock-layout/index.ios.js +53 -45
- package/ui/layouts/dock-layout/index.ios.js.map +1 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js +115 -90
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.android.js +97 -92
- package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.d.ts +32 -0
- package/ui/layouts/flexbox-layout/index.ios.js +427 -366
- package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
- package/ui/layouts/grid-layout/grid-layout-common.js +211 -159
- package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -1
- package/ui/layouts/grid-layout/index.android.js +55 -49
- package/ui/layouts/grid-layout/index.android.js.map +1 -1
- package/ui/layouts/grid-layout/index.d.ts +19 -0
- package/ui/layouts/grid-layout/index.ios.js +348 -340
- package/ui/layouts/grid-layout/index.ios.js.map +1 -1
- package/ui/layouts/layout-base-common.d.ts +0 -1
- package/ui/layouts/layout-base-common.js +106 -85
- package/ui/layouts/layout-base-common.js.map +1 -1
- package/ui/layouts/layout-base.android.js +31 -25
- package/ui/layouts/layout-base.android.js.map +1 -1
- package/ui/layouts/layout-base.d.ts +14 -0
- package/ui/layouts/layout-base.ios.js +27 -21
- package/ui/layouts/layout-base.ios.js.map +1 -1
- package/ui/layouts/root-layout/index.android.js +46 -47
- package/ui/layouts/root-layout/index.android.js.map +1 -1
- package/ui/layouts/root-layout/index.d.ts +3 -0
- package/ui/layouts/root-layout/index.ios.js +53 -54
- package/ui/layouts/root-layout/index.ios.js.map +1 -1
- package/ui/layouts/root-layout/root-layout-common.js +190 -186
- package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
- package/ui/layouts/stack-layout/index.android.js +12 -6
- package/ui/layouts/stack-layout/index.android.js.map +1 -1
- package/ui/layouts/stack-layout/index.d.ts +3 -0
- package/ui/layouts/stack-layout/index.ios.js +69 -62
- package/ui/layouts/stack-layout/index.ios.js.map +1 -1
- package/ui/layouts/stack-layout/stack-layout-common.js +12 -7
- package/ui/layouts/stack-layout/stack-layout-common.js.map +1 -1
- package/ui/layouts/wrap-layout/index.android.js +16 -10
- package/ui/layouts/wrap-layout/index.android.js.map +1 -1
- package/ui/layouts/wrap-layout/index.d.ts +8 -0
- package/ui/layouts/wrap-layout/index.ios.js +76 -70
- package/ui/layouts/wrap-layout/index.ios.js.map +1 -1
- package/ui/layouts/wrap-layout/wrap-layout-common.js +18 -13
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
- package/ui/list-picker/index.android.js +48 -42
- package/ui/list-picker/index.android.js.map +1 -1
- package/ui/list-picker/index.d.ts +12 -1
- package/ui/list-picker/index.ios.js +36 -26
- package/ui/list-picker/index.ios.js.map +1 -1
- package/ui/list-picker/list-picker-common.d.ts +1 -0
- package/ui/list-picker/list-picker-common.js +32 -26
- package/ui/list-picker/list-picker-common.js.map +1 -1
- package/ui/list-view/index.android.js +110 -98
- package/ui/list-view/index.android.js.map +1 -1
- package/ui/list-view/index.d.ts +24 -0
- package/ui/list-view/index.ios.js +137 -121
- package/ui/list-view/index.ios.js.map +1 -1
- package/ui/list-view/list-view-common.js +116 -100
- package/ui/list-view/list-view-common.js.map +1 -1
- package/ui/page/index.android.js +65 -57
- package/ui/page/index.android.js.map +1 -1
- package/ui/page/index.d.ts +31 -2
- package/ui/page/index.ios.js +107 -98
- package/ui/page/index.ios.js.map +1 -1
- package/ui/page/page-common.js +145 -113
- package/ui/page/page-common.js.map +1 -1
- package/ui/placeholder/index.android.d.ts +1 -1
- package/ui/placeholder/index.android.js +16 -10
- package/ui/placeholder/index.android.js.map +1 -1
- package/ui/placeholder/index.d.ts +4 -0
- package/ui/placeholder/index.js +12 -6
- package/ui/placeholder/index.js.map +1 -1
- package/ui/progress/index.android.js +34 -28
- package/ui/progress/index.android.js.map +1 -1
- package/ui/progress/index.d.ts +13 -0
- package/ui/progress/index.ios.js +39 -29
- package/ui/progress/index.ios.js.map +1 -1
- package/ui/progress/progress-common.js +16 -11
- package/ui/progress/progress-common.js.map +1 -1
- package/ui/proxy-view-container/index.d.ts +2 -0
- package/ui/proxy-view-container/index.js +113 -90
- package/ui/proxy-view-container/index.js.map +1 -1
- package/ui/repeater/index.d.ts +2 -0
- package/ui/repeater/index.js +114 -100
- 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 +95 -75
- package/ui/scroll-view/index.android.js.map +1 -1
- package/ui/scroll-view/index.d.ts +10 -0
- package/ui/scroll-view/index.ios.js +92 -72
- package/ui/scroll-view/index.ios.js.map +1 -1
- package/ui/scroll-view/scroll-view-common.js +65 -45
- package/ui/scroll-view/scroll-view-common.js.map +1 -1
- package/ui/search-bar/index.android.js +94 -88
- package/ui/search-bar/index.android.js.map +1 -1
- package/ui/search-bar/index.d.ts +14 -0
- package/ui/search-bar/index.ios.js +88 -74
- package/ui/search-bar/index.ios.js.map +1 -1
- package/ui/search-bar/search-bar-common.js +18 -13
- package/ui/search-bar/search-bar-common.js.map +1 -1
- package/ui/segmented-bar/index.android.js +112 -98
- package/ui/segmented-bar/index.android.js.map +1 -1
- package/ui/segmented-bar/index.d.ts +21 -5
- package/ui/segmented-bar/index.ios.js +80 -63
- package/ui/segmented-bar/index.ios.js.map +1 -1
- package/ui/segmented-bar/segmented-bar-common.js +81 -61
- package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
- package/ui/slider/index.android.js +49 -43
- package/ui/slider/index.android.js.map +1 -1
- package/ui/slider/index.d.ts +27 -0
- package/ui/slider/index.ios.js +59 -49
- package/ui/slider/index.ios.js.map +1 -1
- package/ui/slider/slider-common.d.ts +1 -0
- package/ui/slider/slider-common.js +35 -27
- package/ui/slider/slider-common.js.map +1 -1
- package/ui/styling/background-common.js +100 -98
- package/ui/styling/background-common.js.map +1 -1
- package/ui/styling/background.android.js +38 -35
- package/ui/styling/background.android.js.map +1 -1
- package/ui/styling/background.d.ts +2 -0
- package/ui/styling/background.ios.d.ts +1 -15
- package/ui/styling/background.ios.js +294 -290
- package/ui/styling/background.ios.js.map +1 -1
- package/ui/styling/box-shadow.js +6 -2
- 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 +69 -56
- package/ui/styling/css-animation-parser.js.map +1 -1
- package/ui/styling/css-selector.js +522 -425
- 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 +59 -44
- package/ui/styling/font-common.js.map +1 -1
- package/ui/styling/font.android.js +42 -34
- package/ui/styling/font.android.js.map +1 -1
- package/ui/styling/font.ios.js +54 -49
- package/ui/styling/font.ios.js.map +1 -1
- package/ui/styling/linear-gradient.js +17 -13
- package/ui/styling/linear-gradient.js.map +1 -1
- package/ui/styling/style/index.d.ts +3 -1
- package/ui/styling/style/index.js +46 -35
- package/ui/styling/style/index.js.map +1 -1
- package/ui/styling/style-properties.d.ts +1 -0
- package/ui/styling/style-properties.js +306 -291
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.js +416 -377
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/switch/index.android.js +47 -41
- package/ui/switch/index.android.js.map +1 -1
- package/ui/switch/index.d.ts +11 -0
- package/ui/switch/index.ios.js +66 -57
- package/ui/switch/index.ios.js.map +1 -1
- package/ui/switch/switch-common.js +20 -15
- package/ui/switch/switch-common.js.map +1 -1
- package/ui/tab-view/index.android.js +206 -187
- package/ui/tab-view/index.android.js.map +1 -1
- package/ui/tab-view/index.d.ts +43 -5
- package/ui/tab-view/index.ios.js +177 -161
- package/ui/tab-view/index.ios.js.map +1 -1
- package/ui/tab-view/tab-view-common.js +197 -143
- package/ui/tab-view/tab-view-common.js.map +1 -1
- package/ui/text-base/formatted-string.d.ts +24 -0
- package/ui/text-base/formatted-string.js +158 -105
- package/ui/text-base/formatted-string.js.map +1 -1
- package/ui/text-base/index.android.js +138 -141
- package/ui/text-base/index.android.js.map +1 -1
- package/ui/text-base/index.d.ts +47 -0
- package/ui/text-base/index.ios.js +120 -112
- package/ui/text-base/index.ios.js.map +1 -1
- package/ui/text-base/span.d.ts +30 -0
- package/ui/text-base/span.js +158 -102
- package/ui/text-base/span.js.map +1 -1
- package/ui/text-base/text-base-common.d.ts +2 -0
- package/ui/text-base/text-base-common.js +268 -175
- package/ui/text-base/text-base-common.js.map +1 -1
- package/ui/text-field/index.android.js +24 -18
- package/ui/text-field/index.android.js.map +1 -1
- package/ui/text-field/index.d.ts +13 -0
- package/ui/text-field/index.ios.js +80 -70
- package/ui/text-field/index.ios.js.map +1 -1
- package/ui/text-field/text-field-common.js +13 -8
- package/ui/text-field/text-field-common.js.map +1 -1
- package/ui/text-view/index.android.d.ts +0 -1
- package/ui/text-view/index.android.js +19 -14
- package/ui/text-view/index.android.js.map +1 -1
- package/ui/text-view/index.d.ts +11 -11
- package/ui/text-view/index.ios.d.ts +0 -3
- package/ui/text-view/index.ios.js +129 -177
- package/ui/text-view/index.ios.js.map +1 -1
- package/ui/text-view/text-view-common.d.ts +0 -26
- package/ui/text-view/text-view-common.js +9 -37
- package/ui/text-view/text-view-common.js.map +1 -1
- package/ui/time-picker/index.android.js +24 -18
- package/ui/time-picker/index.android.js.map +1 -1
- package/ui/time-picker/index.d.ts +27 -0
- package/ui/time-picker/index.ios.js +69 -61
- package/ui/time-picker/index.ios.js.map +1 -1
- package/ui/time-picker/time-picker-common.d.ts +1 -0
- package/ui/time-picker/time-picker-common.js +42 -36
- package/ui/time-picker/time-picker-common.js.map +1 -1
- package/ui/transition/fade-transition.android.js +14 -8
- package/ui/transition/fade-transition.android.js.map +1 -1
- package/ui/transition/fade-transition.ios.js +10 -4
- package/ui/transition/fade-transition.ios.js.map +1 -1
- package/ui/transition/flip-transition.android.js +18 -14
- package/ui/transition/flip-transition.android.js.map +1 -1
- package/ui/transition/index.android.js +27 -24
- package/ui/transition/index.android.js.map +1 -1
- package/ui/transition/index.ios.js +22 -18
- package/ui/transition/index.ios.js.map +1 -1
- package/ui/transition/modal-transition.android.js +10 -4
- package/ui/transition/modal-transition.android.js.map +1 -1
- package/ui/transition/modal-transition.ios.js +25 -18
- package/ui/transition/modal-transition.ios.js.map +1 -1
- package/ui/transition/page-transition.android.js +71 -57
- package/ui/transition/page-transition.android.js.map +1 -1
- package/ui/transition/page-transition.ios.js +27 -19
- package/ui/transition/page-transition.ios.js.map +1 -1
- package/ui/transition/shared-transition-helper.android.js +12 -8
- package/ui/transition/shared-transition-helper.android.js.map +1 -1
- package/ui/transition/shared-transition-helper.ios.js +539 -442
- package/ui/transition/shared-transition-helper.ios.js.map +1 -1
- package/ui/transition/shared-transition.js +76 -77
- package/ui/transition/shared-transition.js.map +1 -1
- package/ui/transition/slide-transition.android.js +22 -17
- package/ui/transition/slide-transition.android.js.map +1 -1
- package/ui/transition/slide-transition.ios.js +11 -7
- package/ui/transition/slide-transition.ios.js.map +1 -1
- package/ui/utils.d.ts +1 -1
- package/ui/utils.ios.d.ts +1 -2
- package/ui/utils.ios.js +13 -13
- package/ui/utils.ios.js.map +1 -1
- package/ui/web-view/index.android.js +64 -50
- package/ui/web-view/index.android.js.map +1 -1
- package/ui/web-view/index.d.ts +12 -0
- package/ui/web-view/index.ios.js +73 -50
- package/ui/web-view/index.ios.js.map +1 -1
- package/ui/web-view/web-view-common.d.ts +1 -1
- package/ui/web-view/web-view-common.js +43 -29
- package/ui/web-view/web-view-common.js.map +1 -1
- package/utils/android/index.js +27 -26
- package/utils/android/index.js.map +1 -1
- package/utils/common.js +65 -49
- 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 +54 -32
- package/utils/debug.js.map +1 -1
- package/utils/index.android.d.ts +1 -0
- package/utils/index.android.js +48 -36
- package/utils/index.android.js.map +1 -1
- package/utils/index.d.ts +6 -0
- package/utils/index.ios.d.ts +1 -0
- package/utils/index.ios.js +27 -7
- package/utils/index.ios.js.map +1 -1
- package/utils/ios/index.js +44 -47
- 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 +24 -16
- 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 +43 -33
- package/utils/types.js.map +1 -1
- package/wgc/atob.js +1 -1
- package/wgc/btoa.js +1 -1
- package/wgc/crypto/SubtleCrypto.js +168 -133
- package/wgc/crypto/SubtleCrypto.js.map +1 -1
- package/wgc/crypto/index.d.ts +1 -1
- package/wgc/crypto/index.js +21 -12
- package/wgc/crypto/index.js.map +1 -1
- package/xhr/index.js +308 -226
- package/xhr/index.js.map +1 -1
- package/xml/index.js +119 -79
- package/xml/index.js.map +1 -1
- package/platforms/android/winter_cg-release.aar +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/NSCWinterCG.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/A/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterCG.yml +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/NSCWinterCG.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterCG.yml +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Headers/NSCCrypto.h +0 -79
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Headers/NSString+WinterCG.h +0 -21
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/NSCWinterCG.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCCrypto.h +0 -79
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSCWinterCG.h +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Headers/NSString+WinterCG.h +0 -21
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/NSCWinterCG.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Info.plist +0 -20
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/DWARF/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/aarch64/NSCWinterCG.yml +0 -40
- package/platforms/ios/NSCWinterCG.xcframework/xros-arm64_x86_64-simulator/dSYMs/NSCWinterCG.framework.dSYM/Contents/Resources/Relocations/x86_64/NSCWinterCG.yml +0 -40
package/color/color-common.js
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import * as types from '../utils/types';
|
|
2
2
|
import * as knownColors from './known-colors';
|
|
3
3
|
import { Color } from '.';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
var SHARP = '#';
|
|
5
|
+
var HEX_REGEX = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)|(^#[0-9A-F]{4}$)/i;
|
|
6
|
+
var ColorBase = /** @class */ (function () {
|
|
7
|
+
function ColorBase() {
|
|
8
|
+
var args = [];
|
|
9
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
10
|
+
args[_i] = arguments[_i];
|
|
11
|
+
}
|
|
8
12
|
if (args.length === 1) {
|
|
9
|
-
|
|
13
|
+
var arg = args[0];
|
|
10
14
|
if (types.isString(arg)) {
|
|
11
|
-
|
|
15
|
+
var lowered = arg.toLowerCase();
|
|
12
16
|
if (isRgbOrRgba(lowered)) {
|
|
13
17
|
this._argb = argbFromRgbOrRgba(lowered);
|
|
14
18
|
}
|
|
@@ -20,7 +24,7 @@ export class ColorBase {
|
|
|
20
24
|
}
|
|
21
25
|
else if (knownColors.isKnownName(lowered)) {
|
|
22
26
|
// The parameter is a known color name
|
|
23
|
-
|
|
27
|
+
var argb = knownColors.getKnownColor(lowered);
|
|
24
28
|
this._name = arg;
|
|
25
29
|
this._argb = argb;
|
|
26
30
|
}
|
|
@@ -50,15 +54,15 @@ export class ColorBase {
|
|
|
50
54
|
}
|
|
51
55
|
}
|
|
52
56
|
else if (args.length >= 4) {
|
|
53
|
-
|
|
57
|
+
var a = args[0];
|
|
54
58
|
switch (args[4]) {
|
|
55
59
|
case 'hsl': {
|
|
56
|
-
|
|
60
|
+
var _a = hslToRgb(args[1], args[2], args[3]), r = _a.r, g = _a.g, b = _a.b;
|
|
57
61
|
this._argb = (a & 0xff) * 0x01000000 + (r & 0xff) * 0x00010000 + (g & 0xff) * 0x00000100 + (b & 0xff) * 0x00000001;
|
|
58
62
|
break;
|
|
59
63
|
}
|
|
60
64
|
case 'hsv': {
|
|
61
|
-
|
|
65
|
+
var _b = hsvToRgb(args[1], args[2], args[3]), r = _b.r, g = _b.g, b = _b.b;
|
|
62
66
|
this._argb = (a & 0xff) * 0x01000000 + (r & 0xff) * 0x00010000 + (g & 0xff) * 0x00000100 + (b & 0xff) * 0x00000001;
|
|
63
67
|
break;
|
|
64
68
|
}
|
|
@@ -71,41 +75,77 @@ export class ColorBase {
|
|
|
71
75
|
throw new Error('Expected 1 or 4 constructor parameters.');
|
|
72
76
|
}
|
|
73
77
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
78
|
+
Object.defineProperty(ColorBase.prototype, "a", {
|
|
79
|
+
get: function () {
|
|
80
|
+
return (this._argb / 0x01000000) & 0xff;
|
|
81
|
+
},
|
|
82
|
+
enumerable: false,
|
|
83
|
+
configurable: true
|
|
84
|
+
});
|
|
85
|
+
Object.defineProperty(ColorBase.prototype, "r", {
|
|
86
|
+
get: function () {
|
|
87
|
+
return (this._argb / 0x00010000) & 0xff;
|
|
88
|
+
},
|
|
89
|
+
enumerable: false,
|
|
90
|
+
configurable: true
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperty(ColorBase.prototype, "g", {
|
|
93
|
+
get: function () {
|
|
94
|
+
return (this._argb / 0x00000100) & 0xff;
|
|
95
|
+
},
|
|
96
|
+
enumerable: false,
|
|
97
|
+
configurable: true
|
|
98
|
+
});
|
|
99
|
+
Object.defineProperty(ColorBase.prototype, "b", {
|
|
100
|
+
get: function () {
|
|
101
|
+
return (this._argb / 0x00000001) & 0xff;
|
|
102
|
+
},
|
|
103
|
+
enumerable: false,
|
|
104
|
+
configurable: true
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(ColorBase.prototype, "argb", {
|
|
107
|
+
get: function () {
|
|
108
|
+
return this._argb;
|
|
109
|
+
},
|
|
110
|
+
enumerable: false,
|
|
111
|
+
configurable: true
|
|
112
|
+
});
|
|
113
|
+
Object.defineProperty(ColorBase.prototype, "hex", {
|
|
114
|
+
get: function () {
|
|
115
|
+
var result = SHARP + ('000000' + (this._argb & 0xffffff).toString(16)).toUpperCase().slice(-6);
|
|
116
|
+
if (this.a !== 0xff) {
|
|
117
|
+
return (result += ('00' + this.a.toString(16).toUpperCase()).slice(-2));
|
|
118
|
+
}
|
|
119
|
+
return result;
|
|
120
|
+
},
|
|
121
|
+
enumerable: false,
|
|
122
|
+
configurable: true
|
|
123
|
+
});
|
|
124
|
+
Object.defineProperty(ColorBase.prototype, "name", {
|
|
125
|
+
get: function () {
|
|
126
|
+
return this._name;
|
|
127
|
+
},
|
|
128
|
+
enumerable: false,
|
|
129
|
+
configurable: true
|
|
130
|
+
});
|
|
131
|
+
Object.defineProperty(ColorBase.prototype, "ios", {
|
|
132
|
+
get: function () {
|
|
133
|
+
return undefined;
|
|
134
|
+
},
|
|
135
|
+
enumerable: false,
|
|
136
|
+
configurable: true
|
|
137
|
+
});
|
|
138
|
+
Object.defineProperty(ColorBase.prototype, "android", {
|
|
139
|
+
get: function () {
|
|
140
|
+
return undefined;
|
|
141
|
+
},
|
|
142
|
+
enumerable: false,
|
|
143
|
+
configurable: true
|
|
144
|
+
});
|
|
145
|
+
ColorBase.prototype._argbFromString = function (hex) {
|
|
106
146
|
// always called as SHARP as first char
|
|
107
147
|
hex = hex.substring(1);
|
|
108
|
-
|
|
148
|
+
var length = hex.length;
|
|
109
149
|
// first we normalize
|
|
110
150
|
if (length === 3) {
|
|
111
151
|
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
|
|
@@ -113,7 +153,7 @@ export class ColorBase {
|
|
|
113
153
|
else if (length === 4) {
|
|
114
154
|
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2] + hex[3] + hex[3];
|
|
115
155
|
}
|
|
116
|
-
|
|
156
|
+
var intVal = parseInt(hex, 16);
|
|
117
157
|
if (hex.length === 6) {
|
|
118
158
|
// add the alpha component since the provided string is RRGGBB
|
|
119
159
|
intVal = (intVal & 0x00ffffff) + 0xff000000;
|
|
@@ -121,15 +161,15 @@ export class ColorBase {
|
|
|
121
161
|
else {
|
|
122
162
|
// the new format is #RRGGBBAA
|
|
123
163
|
// we need to shift the alpha value to 0x01000000 position
|
|
124
|
-
|
|
164
|
+
var a = (intVal / 0x00000001) & 0xff;
|
|
125
165
|
intVal = (intVal >>> 8) + (a & 0xff) * 0x01000000;
|
|
126
166
|
}
|
|
127
167
|
return intVal;
|
|
128
|
-
}
|
|
129
|
-
equals(value) {
|
|
168
|
+
};
|
|
169
|
+
ColorBase.prototype.equals = function (value) {
|
|
130
170
|
return value && this.argb === value.argb;
|
|
131
|
-
}
|
|
132
|
-
|
|
171
|
+
};
|
|
172
|
+
ColorBase.equals = function (value1, value2) {
|
|
133
173
|
// both values are falsy
|
|
134
174
|
if (!value1 && !value2) {
|
|
135
175
|
return true;
|
|
@@ -139,65 +179,65 @@ export class ColorBase {
|
|
|
139
179
|
return false;
|
|
140
180
|
}
|
|
141
181
|
return value1.equals(value2);
|
|
142
|
-
}
|
|
143
|
-
|
|
182
|
+
};
|
|
183
|
+
ColorBase.isValid = function (value) {
|
|
144
184
|
if (value instanceof Color) {
|
|
145
185
|
return true;
|
|
146
186
|
}
|
|
147
187
|
if (!types.isString(value)) {
|
|
148
188
|
return false;
|
|
149
189
|
}
|
|
150
|
-
|
|
190
|
+
var lowered = value.toLowerCase();
|
|
151
191
|
if (knownColors.isKnownName(lowered)) {
|
|
152
192
|
return true;
|
|
153
193
|
}
|
|
154
194
|
return HEX_REGEX.test(value) || isRgbOrRgba(lowered) || isHslOrHsla(lowered);
|
|
155
|
-
}
|
|
156
|
-
|
|
195
|
+
};
|
|
196
|
+
ColorBase.fromHSL = function (a, h, s, l) {
|
|
157
197
|
return new Color(a, h, s, l, 'hsl');
|
|
158
|
-
}
|
|
159
|
-
|
|
198
|
+
};
|
|
199
|
+
ColorBase.fromHSV = function (a, h, s, l) {
|
|
160
200
|
return new Color(a, h, s, l, 'hsv');
|
|
161
|
-
}
|
|
162
|
-
toString() {
|
|
201
|
+
};
|
|
202
|
+
ColorBase.prototype.toString = function () {
|
|
163
203
|
return this.hex;
|
|
164
|
-
}
|
|
204
|
+
};
|
|
165
205
|
/**
|
|
166
206
|
* @param {UIColor} value
|
|
167
207
|
*/
|
|
168
|
-
|
|
208
|
+
ColorBase.fromIosColor = function (value) {
|
|
169
209
|
return undefined;
|
|
170
|
-
}
|
|
210
|
+
};
|
|
171
211
|
/**
|
|
172
212
|
* return true if brightness < 128
|
|
173
213
|
*
|
|
174
214
|
*/
|
|
175
|
-
isDark() {
|
|
215
|
+
ColorBase.prototype.isDark = function () {
|
|
176
216
|
return this.getBrightness() < 128;
|
|
177
|
-
}
|
|
217
|
+
};
|
|
178
218
|
/**
|
|
179
219
|
* return true if brightness >= 128
|
|
180
220
|
*
|
|
181
221
|
*/
|
|
182
|
-
isLight() {
|
|
222
|
+
ColorBase.prototype.isLight = function () {
|
|
183
223
|
return !this.isDark();
|
|
184
|
-
}
|
|
224
|
+
};
|
|
185
225
|
/**
|
|
186
226
|
* return the [brightness](http://www.w3.org/TR/AERT#color-contrast)
|
|
187
227
|
*
|
|
188
228
|
*/
|
|
189
|
-
getBrightness() {
|
|
229
|
+
ColorBase.prototype.getBrightness = function () {
|
|
190
230
|
return (this.r * 299 + this.g * 587 + this.b * 114) / 1000;
|
|
191
|
-
}
|
|
231
|
+
};
|
|
192
232
|
/**
|
|
193
233
|
* return the [luminance](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef)
|
|
194
234
|
*
|
|
195
235
|
*/
|
|
196
|
-
getLuminance() {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
236
|
+
ColorBase.prototype.getLuminance = function () {
|
|
237
|
+
var R, G, B;
|
|
238
|
+
var RsRGB = this.r / 255;
|
|
239
|
+
var GsRGB = this.g / 255;
|
|
240
|
+
var BsRGB = this.b / 255;
|
|
201
241
|
if (RsRGB <= 0.03928) {
|
|
202
242
|
R = RsRGB / 12.92;
|
|
203
243
|
}
|
|
@@ -217,147 +257,150 @@ export class ColorBase {
|
|
|
217
257
|
B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
|
|
218
258
|
}
|
|
219
259
|
return 0.2126 * R + 0.7152 * G + 0.0722 * B;
|
|
220
|
-
}
|
|
260
|
+
};
|
|
221
261
|
/**
|
|
222
262
|
* Return this color (as a new Color instance) with the provided alpha
|
|
223
263
|
*
|
|
224
264
|
* @param alpha (between 0 and 255)
|
|
225
265
|
*/
|
|
226
|
-
setAlpha(a) {
|
|
266
|
+
ColorBase.prototype.setAlpha = function (a) {
|
|
227
267
|
return new Color(a, this.r, this.g, this.b);
|
|
228
|
-
}
|
|
268
|
+
};
|
|
229
269
|
/**
|
|
230
270
|
* return the hsl representation of the color
|
|
231
271
|
*
|
|
232
272
|
*/
|
|
233
|
-
toHsl() {
|
|
234
|
-
return {
|
|
235
|
-
}
|
|
273
|
+
ColorBase.prototype.toHsl = function () {
|
|
274
|
+
return __assign(__assign({}, rgbToHsl(this.r, this.g, this.b)), { a: this.a });
|
|
275
|
+
};
|
|
236
276
|
/**
|
|
237
277
|
* return the [CSS hsv](https://www.w3schools.com/Css/css_colors_hsl.asp) representation of the color
|
|
238
278
|
*
|
|
239
279
|
*/
|
|
240
|
-
toHslString() {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
280
|
+
ColorBase.prototype.toHslString = function () {
|
|
281
|
+
var hsl = rgbToHsl(this.r, this.g, this.b);
|
|
282
|
+
var h = Math.round(hsl.h), s = Math.round(hsl.s), l = Math.round(hsl.l);
|
|
283
|
+
var a = this.a;
|
|
244
284
|
return a == 255 ? 'hsl(' + h + ', ' + s + '%, ' + l + '%)' : 'hsla(' + h + ', ' + s + '%, ' + l + '%, ' + (a / 255).toFixed(2) + ')';
|
|
245
|
-
}
|
|
285
|
+
};
|
|
246
286
|
/**
|
|
247
287
|
* return the hsv representation of the color
|
|
248
288
|
*
|
|
249
289
|
*/
|
|
250
|
-
toHsv() {
|
|
251
|
-
return {
|
|
252
|
-
}
|
|
290
|
+
ColorBase.prototype.toHsv = function () {
|
|
291
|
+
return __assign(__assign({}, rgbToHsv(this.r, this.g, this.b)), { a: this.a });
|
|
292
|
+
};
|
|
253
293
|
/**
|
|
254
294
|
* return the [CSS hsv](https://www.w3schools.com/Css/css_colors_rgb.asp) representation of the color
|
|
255
295
|
*
|
|
256
296
|
*/
|
|
257
|
-
toHsvString() {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
297
|
+
ColorBase.prototype.toHsvString = function () {
|
|
298
|
+
var hsv = rgbToHsv(this.r, this.g, this.b);
|
|
299
|
+
var h = Math.round(hsv.h * 360), s = Math.round(hsv.s * 100), v = Math.round(hsv.v * 100);
|
|
300
|
+
var a = this.a;
|
|
261
301
|
return a == 255 ? 'hsv(' + h + ', ' + s + '%, ' + v + '%)' : 'hsva(' + h + ', ' + s + '%, ' + v + '%, ' + (a / 255).toFixed(2) + ')';
|
|
262
|
-
}
|
|
302
|
+
};
|
|
263
303
|
/**
|
|
264
304
|
* return the [CSS rgb](https://www.w3schools.com/Css/css_colors_rgb.asp) representation of the color
|
|
265
305
|
*
|
|
266
306
|
*/
|
|
267
|
-
toRgbString() {
|
|
268
|
-
|
|
307
|
+
ColorBase.prototype.toRgbString = function () {
|
|
308
|
+
var a = this.a;
|
|
269
309
|
return a == 1 ? 'rgb(' + Math.round(this.r) + ', ' + Math.round(this.g) + ', ' + Math.round(this.b) + ')' : 'rgba(' + Math.round(this.r) + ', ' + Math.round(this.g) + ', ' + Math.round(this.b) + ', ' + (a / 255).toFixed(2) + ')';
|
|
270
|
-
}
|
|
310
|
+
};
|
|
271
311
|
/**
|
|
272
312
|
* Desaturate the color a given amount, from 0 to 100. Providing 100 will is the same as calling greyscale.
|
|
273
313
|
*
|
|
274
314
|
* @param amount (between 0 and 100)
|
|
275
315
|
*/
|
|
276
|
-
desaturate(amount) {
|
|
316
|
+
ColorBase.prototype.desaturate = function (amount) {
|
|
277
317
|
amount = amount === 0 ? 0 : amount || 10;
|
|
278
|
-
|
|
318
|
+
var hsl = rgbToHsl(this.r, this.g, this.b);
|
|
279
319
|
return Color.fromHSL(this.a, hsl.h, Math.min(100, Math.max(0, hsl.s - amount)), hsl.l);
|
|
280
|
-
}
|
|
320
|
+
};
|
|
281
321
|
/**
|
|
282
322
|
* Saturate the color a given amount, from 0 to 100.
|
|
283
323
|
*
|
|
284
324
|
* @param amount (between 0 and 100)
|
|
285
325
|
*/
|
|
286
|
-
saturate(amount) {
|
|
326
|
+
ColorBase.prototype.saturate = function (amount) {
|
|
287
327
|
amount = amount === 0 ? 0 : amount || 10;
|
|
288
|
-
|
|
328
|
+
var hsl = rgbToHsl(this.r, this.g, this.b);
|
|
289
329
|
return Color.fromHSL(this.a, hsl.h, Math.min(100, Math.max(0, hsl.s + amount)), hsl.l);
|
|
290
|
-
}
|
|
330
|
+
};
|
|
291
331
|
/**
|
|
292
332
|
* Completely desaturates a color into greyscale. Same as calling desaturate(100).
|
|
293
333
|
*
|
|
294
334
|
*/
|
|
295
|
-
greyscale() {
|
|
335
|
+
ColorBase.prototype.greyscale = function () {
|
|
296
336
|
return this.desaturate(100);
|
|
297
|
-
}
|
|
337
|
+
};
|
|
298
338
|
/**
|
|
299
339
|
* Lighten the color a given amount, from 0 to 100. Providing 100 will always return white.
|
|
300
340
|
*
|
|
301
341
|
* @param amount (between 0 and 100)
|
|
302
342
|
*/
|
|
303
|
-
lighten(amount) {
|
|
343
|
+
ColorBase.prototype.lighten = function (amount) {
|
|
304
344
|
amount = amount === 0 ? 0 : amount || 10;
|
|
305
|
-
|
|
345
|
+
var hsl = rgbToHsl(this.r, this.g, this.b);
|
|
306
346
|
return Color.fromHSL(this.a, hsl.h, hsl.s, Math.min(100, Math.max(0, hsl.l + amount)));
|
|
307
|
-
}
|
|
347
|
+
};
|
|
308
348
|
/**
|
|
309
349
|
* Brighten the color a given amount, from 0 to 100.
|
|
310
350
|
*
|
|
311
351
|
* @param amount (between 0 and 100)
|
|
312
352
|
*/
|
|
313
|
-
brighten(amount) {
|
|
353
|
+
ColorBase.prototype.brighten = function (amount) {
|
|
314
354
|
amount = amount === 0 ? 0 : amount || 10;
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
355
|
+
var r = Math.max(0, Math.min(255, this.r - Math.round(255 * -(amount / 100))));
|
|
356
|
+
var g = Math.max(0, Math.min(255, this.g - Math.round(255 * -(amount / 100))));
|
|
357
|
+
var b = Math.max(0, Math.min(255, this.b - Math.round(255 * -(amount / 100))));
|
|
318
358
|
return new Color(this.a, r, g, b);
|
|
319
|
-
}
|
|
359
|
+
};
|
|
320
360
|
/**
|
|
321
361
|
* Darken the color a given amount, from 0 to 100. Providing 100 will always return black.
|
|
322
362
|
*
|
|
323
363
|
* @param amount (between 0 and 100)
|
|
324
364
|
*/
|
|
325
|
-
darken(amount) {
|
|
365
|
+
ColorBase.prototype.darken = function (amount) {
|
|
326
366
|
amount = amount === 0 ? 0 : amount || 10;
|
|
327
|
-
|
|
367
|
+
var hsl = rgbToHsl(this.r, this.g, this.b);
|
|
328
368
|
return Color.fromHSL(this.a, hsl.h, hsl.s, Math.min(100, Math.max(0, hsl.l - amount)));
|
|
329
|
-
}
|
|
369
|
+
};
|
|
330
370
|
/**
|
|
331
371
|
* Spin the hue a given amount, from -360 to 360. Calling with 0, 360, or -360 will do nothing (since it sets the hue back to what it was before).
|
|
332
372
|
*
|
|
333
373
|
* @param amount (between -360 and 360)
|
|
334
374
|
*/
|
|
335
|
-
spin(amount) {
|
|
336
|
-
|
|
337
|
-
|
|
375
|
+
ColorBase.prototype.spin = function (amount) {
|
|
376
|
+
var hsl = this.toHsl();
|
|
377
|
+
var hue = (hsl.h + amount) % 360;
|
|
338
378
|
hsl.h = hue < 0 ? 360 + hue : hue;
|
|
339
379
|
return Color.fromHSL(this.a, hsl.h, hsl.s, hsl.l);
|
|
340
|
-
}
|
|
380
|
+
};
|
|
341
381
|
/**
|
|
342
382
|
* returns the color complement
|
|
343
383
|
*
|
|
344
384
|
*/
|
|
345
|
-
complement() {
|
|
346
|
-
|
|
385
|
+
ColorBase.prototype.complement = function () {
|
|
386
|
+
var hsl = this.toHsl();
|
|
347
387
|
hsl.h = (hsl.h + 180) % 360;
|
|
348
388
|
return Color.fromHSL(this.a, hsl.h, hsl.s, hsl.l);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
389
|
+
};
|
|
390
|
+
ColorBase.mix = function (color1, color2, amount) {
|
|
391
|
+
if (amount === void 0) { amount = 50; }
|
|
392
|
+
var p = amount / 100;
|
|
393
|
+
var rgba = {
|
|
353
394
|
r: (color2.r - color1.r) * p + color1.r,
|
|
354
395
|
g: (color2.g - color1.g) * p + color1.g,
|
|
355
396
|
b: (color2.b - color1.b) * p + color1.b,
|
|
356
397
|
a: (color2.a - color1.a) * p + color1.a,
|
|
357
398
|
};
|
|
358
399
|
return new Color(rgba.a, rgba.r, rgba.g, rgba.b);
|
|
359
|
-
}
|
|
360
|
-
|
|
400
|
+
};
|
|
401
|
+
return ColorBase;
|
|
402
|
+
}());
|
|
403
|
+
export { ColorBase };
|
|
361
404
|
function isRgbOrRgba(value) {
|
|
362
405
|
return (value.startsWith('rgb(') || value.startsWith('rgba(')) && value.endsWith(')');
|
|
363
406
|
}
|
|
@@ -368,18 +411,18 @@ function isHsvOrHsva(value) {
|
|
|
368
411
|
return (value.startsWith('hsv') || value.startsWith('hsva(')) && value.endsWith(')');
|
|
369
412
|
}
|
|
370
413
|
function parseColorWithAlpha(value) {
|
|
371
|
-
|
|
372
|
-
|
|
414
|
+
var separator = value.indexOf(',') !== -1 ? ',' : ' ';
|
|
415
|
+
var parts = value
|
|
373
416
|
.replace(/(rgb|hsl|hsv)a?\(/, '')
|
|
374
417
|
.replace(')', '')
|
|
375
418
|
.replace(/\//, ' ')
|
|
376
419
|
.replace(/%/g, '')
|
|
377
420
|
.split(separator)
|
|
378
|
-
.filter((part)
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
421
|
+
.filter(function (part) { return Boolean(part.length); });
|
|
422
|
+
var f = 255;
|
|
423
|
+
var s = 255;
|
|
424
|
+
var t = 255;
|
|
425
|
+
var a = 255;
|
|
383
426
|
if (parts[0]) {
|
|
384
427
|
f = parseFloat(parts[0].trim());
|
|
385
428
|
}
|
|
@@ -392,20 +435,20 @@ function parseColorWithAlpha(value) {
|
|
|
392
435
|
if (parts[3]) {
|
|
393
436
|
a = Math.round(parseFloat(parts[3].trim()) * 255);
|
|
394
437
|
}
|
|
395
|
-
return { f, s, t, a };
|
|
438
|
+
return { f: f, s: s, t: t, a: a };
|
|
396
439
|
}
|
|
397
440
|
function argbFromRgbOrRgba(value) {
|
|
398
|
-
|
|
441
|
+
var _a = parseColorWithAlpha(value), r = _a.f, g = _a.s, b = _a.t, a = _a.a;
|
|
399
442
|
return (a & 0xff) * 0x01000000 + (r & 0xff) * 0x00010000 + (g & 0xff) * 0x00000100 + (b & 0xff);
|
|
400
443
|
}
|
|
401
444
|
function argbFromHslOrHsla(value) {
|
|
402
|
-
|
|
403
|
-
|
|
445
|
+
var _a = parseColorWithAlpha(value), h = _a.f, s = _a.s, l = _a.t, a = _a.a;
|
|
446
|
+
var _b = hslToRgb(h, s, l), r = _b.r, g = _b.g, b = _b.b;
|
|
404
447
|
return (a & 0xff) * 0x01000000 + (r & 0xff) * 0x00010000 + (g & 0xff) * 0x00000100 + (b & 0xff);
|
|
405
448
|
}
|
|
406
449
|
function argbFromHsvOrHsva(value) {
|
|
407
|
-
|
|
408
|
-
|
|
450
|
+
var _a = parseColorWithAlpha(value), h = _a.f, s = _a.s, v = _a.t, a = _a.a;
|
|
451
|
+
var _b = hsvToRgb(h, s, v), r = _b.r, g = _b.g, b = _b.b;
|
|
409
452
|
return (a & 0xff) * 0x01000000 + (r & 0xff) * 0x00010000 + (g & 0xff) * 0x00000100 + (b & 0xff);
|
|
410
453
|
}
|
|
411
454
|
// `rgbToHsl`
|
|
@@ -416,14 +459,14 @@ function rgbToHsl(r, g, b) {
|
|
|
416
459
|
r /= 255;
|
|
417
460
|
g /= 255;
|
|
418
461
|
b /= 255;
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
462
|
+
var max = Math.max(r, g, b), min = Math.min(r, g, b);
|
|
463
|
+
var h, s;
|
|
464
|
+
var l = (max + min) / 2;
|
|
422
465
|
if (max == min) {
|
|
423
466
|
h = s = 0; // achromatic
|
|
424
467
|
}
|
|
425
468
|
else {
|
|
426
|
-
|
|
469
|
+
var d = max - min;
|
|
427
470
|
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
428
471
|
switch (max) {
|
|
429
472
|
case r:
|
|
@@ -458,16 +501,16 @@ function hue2rgb(p, q, t) {
|
|
|
458
501
|
// *Assumes:* h is contained in [0, 360] and s and l are contained [0, 100]
|
|
459
502
|
// *Returns:* { r, g, b } in the set [0, 255]
|
|
460
503
|
function hslToRgb(h1, s1, l1) {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
504
|
+
var h = (h1 % 360) / 360;
|
|
505
|
+
var s = s1 / 100;
|
|
506
|
+
var l = l1 / 100;
|
|
507
|
+
var r, g, b;
|
|
465
508
|
if (s === 0) {
|
|
466
509
|
r = g = b = l; // achromatic
|
|
467
510
|
}
|
|
468
511
|
else {
|
|
469
|
-
|
|
470
|
-
|
|
512
|
+
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
513
|
+
var p = 2 * l - q;
|
|
471
514
|
r = hue2rgb(p, q, h + 1 / 3);
|
|
472
515
|
g = hue2rgb(p, q, h);
|
|
473
516
|
b = hue2rgb(p, q, h - 1 / 3);
|
|
@@ -482,11 +525,11 @@ function rgbToHsv(r, g, b) {
|
|
|
482
525
|
r /= 255;
|
|
483
526
|
g /= 255;
|
|
484
527
|
b /= 255;
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
528
|
+
var max = Math.max(r, g, b), min = Math.min(r, g, b);
|
|
529
|
+
var h;
|
|
530
|
+
var v = max;
|
|
531
|
+
var d = max - min;
|
|
532
|
+
var s = max === 0 ? 0 : d / max;
|
|
490
533
|
if (max == min) {
|
|
491
534
|
h = 0; // achromatic
|
|
492
535
|
}
|
|
@@ -511,10 +554,10 @@ function rgbToHsv(r, g, b) {
|
|
|
511
554
|
// *Assumes:* h is contained in [0, 360] and s and v are contained [0, 100]
|
|
512
555
|
// *Returns:* { r, g, b } in the set [0, 255]
|
|
513
556
|
function hsvToRgb(h1, s1, v1) {
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
557
|
+
var h = ((h1 % 360) / 360) * 6;
|
|
558
|
+
var s = s1 / 100;
|
|
559
|
+
var v = v1 / 100;
|
|
560
|
+
var i = Math.floor(h), f = h - i, p = v * (1 - s), q = v * (1 - f * s), t = v * (1 - (1 - f) * s), mod = i % 6, r = [v, q, p, p, t, v][mod], g = [t, v, v, q, p, p][mod], b = [p, p, t, v, v, q][mod];
|
|
518
561
|
return { r: r * 255, g: g * 255, b: b * 255 };
|
|
519
562
|
}
|
|
520
563
|
//# sourceMappingURL=color-common.js.map
|