@nativescript/core 8.9.0-next-01-17-2025-12834437745 → 8.9.0-next-01-18-2025-12839190246
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-service.d.ts +10 -0
- package/accessibility/font-scale.d.ts +9 -0
- package/accessibility/index.d.ts +37 -0
- package/animation-frame/animation-native.d.ts +4 -0
- package/animation-frame/index.d.ts +17 -3
- package/application/application.d.ts +194 -0
- package/application/index.d.ts +2 -0
- package/application-settings/index.d.ts +70 -0
- package/cli-hooks/before-checkForChanges.js +60 -0
- package/cli-hooks/postinstall.js +2 -0
- package/cli-hooks/preuninstall.js +2 -0
- package/color/index.d.ts +206 -0
- package/connectivity/index.d.ts +52 -0
- package/css/css-tree-parser.js +21 -17
- package/css/lib/parse/index.js +602 -0
- package/css/package.json +36 -0
- package/css/reworkcss.d.ts +47 -0
- package/css/reworkcss.js +1 -0
- package/css-value/package.json +23 -0
- package/css-value/reworkcss-value.d.ts +8 -0
- package/css-value/reworkcss-value.js +113 -0
- package/debugger/css-agent.d.ts +59 -0
- package/debugger/devtools-elements.d.ts +23 -5
- package/debugger/dom-node.d.ts +23 -20
- package/fetch/index.js +539 -0
- package/file-system/file-system-access.d.ts +441 -0
- package/file-system/index.d.ts +370 -95
- package/fps-meter/fps-native.d.ts +24 -0
- package/fps-meter/index.d.ts +24 -7
- package/global-types.d.ts +393 -0
- package/globals/index.d.ts +4 -19
- package/http/http-request/index.d.ts +3 -0
- package/http/index.d.ts +149 -73
- package/image-asset/index.d.ts +17 -0
- package/image-source/index.d.ts +350 -0
- package/index.d.ts +24 -7
- package/js-libs/easysax/easysax.d.ts +8 -0
- package/js-libs/easysax/easysax.js +782 -0
- package/js-libs/easysax/package.json +35 -0
- package/matrix/index.d.ts +32 -5
- package/module-name-resolver/index.d.ts +21 -13
- package/module-name-resolver/qualifier-matcher/index.d.ts +12 -6
- package/package.json +1 -1
- package/platform/device/index.d.ts +70 -0
- package/platform/index.d.ts +26 -0
- package/platform/screen/index.d.ts +48 -0
- package/platforms/android/native-api-usage.json +32 -0
- package/platforms/android/res/values/ids.xml +4 -0
- package/platforms/android/widgets-release.aar +0 -0
- package/platforms/android/winter_tc-release.aar +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/Info.plist +102 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64/NSCWinterTC.framework/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64/NSCWinterTC.framework/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64/NSCWinterTC.framework/Headers/NSString+WinterTC.h +21 -0
- package/platforms/ios/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/NSCWinterTC.xcframework/ios-arm64/NSCWinterTC.framework/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64/dSYMs/NSCWinterTC.framework.dSYM/Contents/Info.plist +20 -0
- 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/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Headers/NSString+WinterTC.h +21 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Resources/Info.plist +52 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A/Headers/NSString+WinterTC.h +21 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A/Modules/module.modulemap +6 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/A/Resources/Info.plist +52 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterTC.framework/Versions/Current/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/NSCWinterTC.framework.dSYM/Contents/Info.plist +20 -0
- 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/NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework/Headers/NSCWinterTC.h +20 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework/Headers/NSString+WinterTC.h +21 -0
- package/platforms/ios/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/NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/NSCWinterTC.framework/_CodeSignature/CodeResources +146 -0
- package/platforms/ios/NSCWinterTC.xcframework/ios-arm64_x86_64-simulator/dSYMs/NSCWinterTC.framework.dSYM/Contents/Info.plist +20 -0
- 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/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/NSCWinterTC.xcframework/xros-arm64/NSCWinterTC.framework/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64/dSYMs/NSCWinterTC.framework.dSYM/Contents/Info.plist +20 -0
- 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/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/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/NSCWinterTC.framework/NSCWinterTC +0 -0
- package/platforms/ios/NSCWinterTC.xcframework/xros-arm64_x86_64-simulator/NSCWinterTC.framework/_CodeSignature/CodeResources +146 -0
- 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/TNSWidgets.xcframework/Info.plist +102 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/NSData+Async.h +24 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/NSString+Async.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/TNSLabel.h +16 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/TNSProcess.h +29 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/TNSWidgets.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +26 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +18 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +20 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +82 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSData+Async.h +24 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSString+Async.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSLabel.h +16 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSProcess.h +29 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSWidgets.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +26 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +18 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +52 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSCCrypto.h +60 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSData+Async.h +24 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSString+Async.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSLabel.h +16 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSProcess.h +29 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSWidgets.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/UIImage+TNSBlocks.h +26 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/UIView+PassThroughParent.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Modules/module.modulemap +6 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/PrivateHeaders/NSObject+Swizzling.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/PrivateHeaders/UIView+PropertyBag.h +18 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Resources/Info.plist +52 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +20 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +82 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +82 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSData+Async.h +24 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSString+Async.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSLabel.h +16 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSProcess.h +29 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSWidgets.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +26 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +18 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +223 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +20 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +82 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +82 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSData+Async.h +24 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSString+Async.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSLabel.h +16 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSProcess.h +29 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSWidgets.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +26 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +18 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +20 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +82 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSData+Async.h +24 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSString+Async.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSLabel.h +16 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSProcess.h +29 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSWidgets.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +26 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +18 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +223 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +20 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +82 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +82 -0
- package/platforms/ios/native-api-usage.json +41 -0
- package/platforms/ios/src/NativeScriptEmbedder.h +31 -0
- package/platforms/ios/src/NativeScriptEmbedder.m +43 -0
- package/platforms/ios/src/NativeScriptMainWindow.swift +196 -0
- package/platforms/ios/src/NativeScriptUtils.h +16 -0
- package/platforms/ios/src/NativeScriptUtils.m +137 -0
- package/platforms/ios/src/UIView+NativeScript.h +15 -0
- package/platforms/ios/src/UIView+NativeScript.m +148 -0
- package/platforms/ios/src/module.modulemap +14 -0
- package/platforms/ios/typings/objc!MaterialComponents.d.ts +808 -0
- package/platforms/ios/typings/objc!NativeScriptUtils.d.ts +18 -0
- package/profiling/index.d.ts +153 -26
- package/references.d.ts +10 -0
- package/text/formatted-string.d.ts +1 -1
- package/text/index.d.ts +36 -0
- package/text/span.d.ts +1 -1
- package/timer/index.d.ts +27 -0
- package/trace/index.d.ts +131 -105
- package/ui/action-bar/index.d.ts +304 -0
- package/ui/activity-indicator/index.d.ts +25 -0
- package/ui/animation/index.d.ts +139 -0
- package/ui/animation/keyframe-animation.d.ts +118 -67
- package/ui/builder/binding-builder.d.ts +15 -12
- package/ui/builder/index.d.ts +69 -27
- package/ui/button/index.d.ts +50 -0
- package/ui/content-view/index.d.ts +11 -21
- package/ui/core/control-state-change/index.d.ts +17 -0
- package/ui/core/view/index.d.ts +1216 -0
- package/ui/core/view/view-helper/index.d.ts +76 -0
- package/ui/core/weak-event-listener/index.d.ts +18 -2
- package/ui/date-picker/index.d.ts +95 -0
- package/ui/dialogs/index.d.ts +311 -0
- package/ui/editable-text-base/index.d.ts +142 -0
- package/ui/embedding/index.d.ts +10 -0
- package/ui/frame/fragment.d.ts +5 -0
- package/ui/frame/fragment.transitions.d.ts +43 -0
- package/ui/frame/index.d.ts +590 -0
- package/ui/frame/transition-definitions.android.d.ts +54 -0
- package/ui/gestures/index.d.ts +59 -0
- package/ui/html-view/index.d.ts +41 -0
- package/ui/image/index.d.ts +119 -0
- package/ui/image/symbol-effects.d.ts +13 -0
- package/ui/image-cache/index.d.ts +147 -0
- package/ui/label/index.d.ts +25 -0
- package/ui/layouts/absolute-layout/index.d.ts +42 -0
- package/ui/layouts/dock-layout/index.d.ts +39 -0
- package/ui/layouts/flexbox-layout/index.d.ts +98 -0
- package/ui/layouts/grid-layout/index.d.ts +201 -0
- package/ui/layouts/index.d.ts +1 -2
- package/ui/layouts/layout-base.d.ts +119 -0
- package/ui/layouts/root-layout/index.d.ts +48 -0
- package/ui/layouts/stack-layout/index.d.ts +22 -0
- package/ui/layouts/wrap-layout/index.d.ts +51 -0
- package/ui/list-picker/index.d.ts +43 -0
- package/ui/list-view/index.d.ts +232 -0
- package/ui/page/index.d.ts +241 -0
- package/ui/placeholder/index.d.ts +46 -8
- package/ui/progress/index.d.ts +50 -0
- package/ui/scroll-view/index.d.ts +99 -0
- package/ui/search-bar/index.d.ts +103 -0
- package/ui/segmented-bar/index.d.ts +122 -0
- package/ui/slider/index.d.ts +99 -0
- package/ui/styling/background.d.ts +95 -0
- package/ui/styling/converters.d.ts +2 -2
- package/ui/styling/font.d.ts +62 -0
- package/ui/styling/style-properties.d.ts +101 -81
- package/ui/styling/style-scope.d.ts +48 -79
- package/ui/switch/index.d.ts +46 -0
- package/ui/tab-view/index.d.ts +213 -0
- package/ui/text-base/formatted-string.d.ts +97 -36
- package/ui/text-base/index.d.ts +208 -0
- package/ui/text-base/span.d.ts +111 -36
- package/ui/text-field/index.d.ts +54 -0
- package/ui/text-view/index.d.ts +35 -0
- package/ui/time-picker/index.d.ts +107 -0
- package/ui/transition/fade-transition.d.ts +3 -0
- package/ui/transition/flip-transition.d.ts +5 -0
- package/ui/transition/index.d.ts +59 -0
- package/ui/transition/modal-transition.d.ts +2 -0
- package/ui/transition/page-transition.d.ts +4 -0
- package/ui/transition/shared-transition-helper.d.ts +14 -0
- package/ui/transition/slide-transition.d.ts +5 -0
- package/ui/utils.d.ts +44 -0
- package/ui/web-view/index.d.ts +142 -0
- package/utils/constants.d.ts +1 -0
- package/utils/debug.d.ts +61 -17
- package/utils/index.d.ts +183 -0
- package/utils/layout-helper/index.d.ts +82 -0
- package/utils/lazy.d.ts +5 -0
- package/utils/macrotask-scheduler.d.ts +5 -1
- package/utils/mainthread-helper.d.ts +16 -0
- package/utils/native-helper.d.ts +280 -0
- package/utils/types.d.ts +115 -23
- package/utils/typescript-utils.d.ts +6 -0
- package/xml/index.d.ts +105 -44
package/css/css-tree-parser.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.cssTreeParse = void 0;
|
|
3
|
+
var css_tree_1 = require("css-tree");
|
|
2
4
|
function mapSelectors(selector) {
|
|
3
5
|
if (!selector) {
|
|
4
6
|
return [];
|
|
5
7
|
}
|
|
6
|
-
return selector.split(/\s*(?![^(]*\)),\s*/).map((s)
|
|
8
|
+
return selector.split(/\s*(?![^(]*\)),\s*/).map(function (s) { return s.replace(/\u200C/g, ','); });
|
|
7
9
|
}
|
|
8
10
|
function mapPosition(node, css) {
|
|
9
|
-
|
|
11
|
+
var res = {
|
|
10
12
|
start: {
|
|
11
13
|
line: node.loc.start.line,
|
|
12
14
|
column: node.loc.start.column,
|
|
@@ -22,7 +24,8 @@ function mapPosition(node, css) {
|
|
|
22
24
|
}
|
|
23
25
|
return res;
|
|
24
26
|
}
|
|
25
|
-
function transformAst(node, css, type
|
|
27
|
+
function transformAst(node, css, type) {
|
|
28
|
+
if (type === void 0) { type = null; }
|
|
26
29
|
if (!node) {
|
|
27
30
|
return;
|
|
28
31
|
}
|
|
@@ -31,15 +34,15 @@ function transformAst(node, css, type = null) {
|
|
|
31
34
|
type: 'stylesheet',
|
|
32
35
|
stylesheet: {
|
|
33
36
|
rules: node.children
|
|
34
|
-
.map((child)
|
|
35
|
-
.filter((child)
|
|
37
|
+
.map(function (child) { return transformAst(child, css); })
|
|
38
|
+
.filter(function (child) { return child !== null; })
|
|
36
39
|
.toArray(),
|
|
37
40
|
parsingErrors: [],
|
|
38
41
|
},
|
|
39
42
|
};
|
|
40
43
|
}
|
|
41
44
|
if (node.type === 'Atrule') {
|
|
42
|
-
|
|
45
|
+
var atrule = {
|
|
43
46
|
type: node.name,
|
|
44
47
|
};
|
|
45
48
|
if (node.name === 'supports' || node.name === 'media') {
|
|
@@ -74,13 +77,13 @@ function transformAst(node, css, type = null) {
|
|
|
74
77
|
}
|
|
75
78
|
if (node.type === 'Block') {
|
|
76
79
|
return node.children
|
|
77
|
-
.map((child)
|
|
78
|
-
.filter((child)
|
|
80
|
+
.map(function (child) { return transformAst(child, css, type); })
|
|
81
|
+
.filter(function (child) { return child !== null; })
|
|
79
82
|
.toArray();
|
|
80
83
|
}
|
|
81
84
|
if (node.type === 'Rule') {
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
var value = node.prelude.value;
|
|
86
|
+
var res = {
|
|
84
87
|
type: type != null ? type : 'rule',
|
|
85
88
|
declarations: transformAst(node.block, css),
|
|
86
89
|
position: mapPosition(node, css),
|
|
@@ -111,18 +114,18 @@ function transformAst(node, css, type = null) {
|
|
|
111
114
|
if (node.type === 'Raw') {
|
|
112
115
|
return null;
|
|
113
116
|
}
|
|
114
|
-
throw Error(
|
|
117
|
+
throw Error("Unknown node type ".concat(node.type));
|
|
115
118
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
function cssTreeParse(css, source) {
|
|
120
|
+
var errors = [];
|
|
121
|
+
var ast = (0, css_tree_1.parse)(css, {
|
|
119
122
|
parseValue: false,
|
|
120
123
|
parseAtrulePrelude: false,
|
|
121
124
|
parseRulePrelude: false,
|
|
122
125
|
positions: true,
|
|
123
126
|
filename: source,
|
|
124
|
-
onParseError: (error)
|
|
125
|
-
errors.push(
|
|
127
|
+
onParseError: function (error) {
|
|
128
|
+
errors.push("".concat(source, ":").concat(error.line, ":").concat(error.column, ": ").concat(error.formattedMessage));
|
|
126
129
|
},
|
|
127
130
|
});
|
|
128
131
|
if (errors.length > 0) {
|
|
@@ -130,4 +133,5 @@ export function cssTreeParse(css, source) {
|
|
|
130
133
|
}
|
|
131
134
|
return transformAst(ast, css);
|
|
132
135
|
}
|
|
136
|
+
exports.cssTreeParse = cssTreeParse;
|
|
133
137
|
//# sourceMappingURL=css-tree-parser.js.map
|
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
// http://www.w3.org/TR/CSS21/grammar.html
|
|
2
|
+
// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
|
|
3
|
+
var commentre = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g
|
|
4
|
+
|
|
5
|
+
module.exports = function(css, options){
|
|
6
|
+
options = options || {};
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Positional.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
var lineno = 1;
|
|
13
|
+
var column = 1;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Update lineno and column based on `str`.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
function updatePosition(str) {
|
|
20
|
+
var lines = str.match(/\n/g);
|
|
21
|
+
if (lines) lineno += lines.length;
|
|
22
|
+
var i = str.lastIndexOf('\n');
|
|
23
|
+
column = ~i ? str.length - i : column + str.length;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Mark position and patch `node.position`.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
function position() {
|
|
31
|
+
var start = { line: lineno, column: column };
|
|
32
|
+
return function(node){
|
|
33
|
+
node.position = new Position(start);
|
|
34
|
+
whitespace();
|
|
35
|
+
return node;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Store position information for a node
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
function Position(start) {
|
|
44
|
+
this.start = start;
|
|
45
|
+
this.end = { line: lineno, column: column };
|
|
46
|
+
this.source = options.source;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Non-enumerable source string
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
Position.prototype.content = css;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Error `msg`.
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
var errorsList = [];
|
|
60
|
+
|
|
61
|
+
function error(msg) {
|
|
62
|
+
var err = new Error(options.source + ':' + lineno + ':' + column + ': ' + msg);
|
|
63
|
+
err.reason = msg;
|
|
64
|
+
err.filename = options.source;
|
|
65
|
+
err.line = lineno;
|
|
66
|
+
err.column = column;
|
|
67
|
+
err.source = css;
|
|
68
|
+
|
|
69
|
+
if (options.silent) {
|
|
70
|
+
errorsList.push(err);
|
|
71
|
+
} else {
|
|
72
|
+
throw err;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Parse stylesheet.
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
function stylesheet() {
|
|
81
|
+
var rulesList = rules();
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
type: 'stylesheet',
|
|
85
|
+
stylesheet: {
|
|
86
|
+
rules: rulesList,
|
|
87
|
+
parsingErrors: errorsList
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Opening brace.
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
function open() {
|
|
97
|
+
return match(/^{\s*/);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Closing brace.
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
function close() {
|
|
105
|
+
return match(/^}/);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Parse ruleset.
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
function rules() {
|
|
113
|
+
var node;
|
|
114
|
+
var rules = [];
|
|
115
|
+
whitespace();
|
|
116
|
+
comments(rules);
|
|
117
|
+
while (css.length && css.charAt(0) != '}' && (node = atrule() || rule())) {
|
|
118
|
+
if (node !== false) {
|
|
119
|
+
rules.push(node);
|
|
120
|
+
comments(rules);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return rules;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Match `re` and return captures.
|
|
128
|
+
*/
|
|
129
|
+
|
|
130
|
+
function match(re) {
|
|
131
|
+
var m = re.exec(css);
|
|
132
|
+
if (!m) return;
|
|
133
|
+
var str = m[0];
|
|
134
|
+
updatePosition(str);
|
|
135
|
+
css = css.slice(str.length);
|
|
136
|
+
return m;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Parse whitespace.
|
|
141
|
+
*/
|
|
142
|
+
|
|
143
|
+
function whitespace() {
|
|
144
|
+
match(/^\s*/);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Parse comments;
|
|
149
|
+
*/
|
|
150
|
+
|
|
151
|
+
function comments(rules) {
|
|
152
|
+
var c;
|
|
153
|
+
rules = rules || [];
|
|
154
|
+
while (c = comment()) {
|
|
155
|
+
if (c !== false) {
|
|
156
|
+
rules.push(c);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return rules;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Parse comment.
|
|
164
|
+
*/
|
|
165
|
+
|
|
166
|
+
function comment() {
|
|
167
|
+
var pos = position();
|
|
168
|
+
if ('/' != css.charAt(0) || '*' != css.charAt(1)) return;
|
|
169
|
+
|
|
170
|
+
var i = 2;
|
|
171
|
+
while ("" != css.charAt(i) && ('*' != css.charAt(i) || '/' != css.charAt(i + 1))) ++i;
|
|
172
|
+
i += 2;
|
|
173
|
+
|
|
174
|
+
if ("" === css.charAt(i-1)) {
|
|
175
|
+
return error('End of comment missing');
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
var str = css.slice(2, i - 2);
|
|
179
|
+
column += 2;
|
|
180
|
+
updatePosition(str);
|
|
181
|
+
css = css.slice(i);
|
|
182
|
+
column += 2;
|
|
183
|
+
|
|
184
|
+
return pos({
|
|
185
|
+
type: 'comment',
|
|
186
|
+
comment: str
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Parse selector.
|
|
192
|
+
*/
|
|
193
|
+
|
|
194
|
+
function selector() {
|
|
195
|
+
var m = match(/^([^{]+)/);
|
|
196
|
+
if (!m) return;
|
|
197
|
+
/* @fix Remove all comments from selectors
|
|
198
|
+
* http://ostermiller.org/findcomment.html */
|
|
199
|
+
return trim(m[0])
|
|
200
|
+
.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g, '')
|
|
201
|
+
.replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g, function(m) {
|
|
202
|
+
return m.replace(/,/g, '\u200C');
|
|
203
|
+
})
|
|
204
|
+
.split(/\s*(?![^(]*\)),\s*/)
|
|
205
|
+
.map(function(s) {
|
|
206
|
+
return s.replace(/\u200C/g, ',');
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Parse declaration.
|
|
212
|
+
*/
|
|
213
|
+
|
|
214
|
+
function declaration() {
|
|
215
|
+
var pos = position();
|
|
216
|
+
|
|
217
|
+
// prop
|
|
218
|
+
var prop = match(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);
|
|
219
|
+
if (!prop) return;
|
|
220
|
+
prop = trim(prop[0]);
|
|
221
|
+
|
|
222
|
+
// :
|
|
223
|
+
if (!match(/^:\s*/)) return error("property missing ':'");
|
|
224
|
+
|
|
225
|
+
// val
|
|
226
|
+
var val = match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/);
|
|
227
|
+
|
|
228
|
+
var ret = pos({
|
|
229
|
+
type: 'declaration',
|
|
230
|
+
property: prop.replace(commentre, ''),
|
|
231
|
+
value: val ? trim(val[0]).replace(commentre, '') : ''
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
// ;
|
|
235
|
+
match(/^[;\s]*/);
|
|
236
|
+
|
|
237
|
+
return ret;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Parse declarations.
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
function declarations() {
|
|
245
|
+
var decls = [];
|
|
246
|
+
|
|
247
|
+
if (!open()) return error("missing '{'");
|
|
248
|
+
comments(decls);
|
|
249
|
+
|
|
250
|
+
// declarations
|
|
251
|
+
var decl;
|
|
252
|
+
while (decl = declaration()) {
|
|
253
|
+
if (decl !== false) {
|
|
254
|
+
decls.push(decl);
|
|
255
|
+
comments(decls);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
if (!close()) return error("missing '}'");
|
|
260
|
+
return decls;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Parse keyframe.
|
|
265
|
+
*/
|
|
266
|
+
|
|
267
|
+
function keyframe() {
|
|
268
|
+
var m;
|
|
269
|
+
var vals = [];
|
|
270
|
+
var pos = position();
|
|
271
|
+
|
|
272
|
+
while (m = match(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/)) {
|
|
273
|
+
vals.push(m[1]);
|
|
274
|
+
match(/^,\s*/);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (!vals.length) return;
|
|
278
|
+
|
|
279
|
+
return pos({
|
|
280
|
+
type: 'keyframe',
|
|
281
|
+
values: vals,
|
|
282
|
+
declarations: declarations()
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Parse keyframes.
|
|
288
|
+
*/
|
|
289
|
+
|
|
290
|
+
function atkeyframes() {
|
|
291
|
+
var pos = position();
|
|
292
|
+
var m = match(/^@([-\w]+)?keyframes\s*/);
|
|
293
|
+
|
|
294
|
+
if (!m) return;
|
|
295
|
+
var vendor = m[1];
|
|
296
|
+
|
|
297
|
+
// identifier
|
|
298
|
+
var m = match(/^([-\w]+)\s*/);
|
|
299
|
+
if (!m) return error("@keyframes missing name");
|
|
300
|
+
var name = m[1];
|
|
301
|
+
|
|
302
|
+
if (!open()) return error("@keyframes missing '{'");
|
|
303
|
+
|
|
304
|
+
var frame;
|
|
305
|
+
var frames = comments();
|
|
306
|
+
while (frame = keyframe()) {
|
|
307
|
+
frames.push(frame);
|
|
308
|
+
frames = frames.concat(comments());
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if (!close()) return error("@keyframes missing '}'");
|
|
312
|
+
|
|
313
|
+
return pos({
|
|
314
|
+
type: 'keyframes',
|
|
315
|
+
name: name,
|
|
316
|
+
vendor: vendor,
|
|
317
|
+
keyframes: frames
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Parse supports.
|
|
323
|
+
*/
|
|
324
|
+
|
|
325
|
+
function atsupports() {
|
|
326
|
+
var pos = position();
|
|
327
|
+
var m = match(/^@supports *([^{]+)/);
|
|
328
|
+
|
|
329
|
+
if (!m) return;
|
|
330
|
+
var supports = trim(m[1]);
|
|
331
|
+
|
|
332
|
+
if (!open()) return error("@supports missing '{'");
|
|
333
|
+
|
|
334
|
+
var style = comments().concat(rules());
|
|
335
|
+
|
|
336
|
+
if (!close()) return error("@supports missing '}'");
|
|
337
|
+
|
|
338
|
+
return pos({
|
|
339
|
+
type: 'supports',
|
|
340
|
+
supports: supports,
|
|
341
|
+
rules: style
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Parse host.
|
|
347
|
+
*/
|
|
348
|
+
|
|
349
|
+
function athost() {
|
|
350
|
+
var pos = position();
|
|
351
|
+
var m = match(/^@host\s*/);
|
|
352
|
+
|
|
353
|
+
if (!m) return;
|
|
354
|
+
|
|
355
|
+
if (!open()) return error("@host missing '{'");
|
|
356
|
+
|
|
357
|
+
var style = comments().concat(rules());
|
|
358
|
+
|
|
359
|
+
if (!close()) return error("@host missing '}'");
|
|
360
|
+
|
|
361
|
+
return pos({
|
|
362
|
+
type: 'host',
|
|
363
|
+
rules: style
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Parse media.
|
|
369
|
+
*/
|
|
370
|
+
|
|
371
|
+
function atmedia() {
|
|
372
|
+
var pos = position();
|
|
373
|
+
var m = match(/^@media *([^{]+)/);
|
|
374
|
+
|
|
375
|
+
if (!m) return;
|
|
376
|
+
var media = trim(m[1]);
|
|
377
|
+
|
|
378
|
+
if (!open()) return error("@media missing '{'");
|
|
379
|
+
|
|
380
|
+
var style = comments().concat(rules());
|
|
381
|
+
|
|
382
|
+
if (!close()) return error("@media missing '}'");
|
|
383
|
+
|
|
384
|
+
return pos({
|
|
385
|
+
type: 'media',
|
|
386
|
+
media: media,
|
|
387
|
+
rules: style
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Parse custom-media.
|
|
394
|
+
*/
|
|
395
|
+
|
|
396
|
+
function atcustommedia() {
|
|
397
|
+
var pos = position();
|
|
398
|
+
var m = match(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);
|
|
399
|
+
if (!m) return;
|
|
400
|
+
|
|
401
|
+
return pos({
|
|
402
|
+
type: 'custom-media',
|
|
403
|
+
name: trim(m[1]),
|
|
404
|
+
media: trim(m[2])
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Parse paged media.
|
|
410
|
+
*/
|
|
411
|
+
|
|
412
|
+
function atpage() {
|
|
413
|
+
var pos = position();
|
|
414
|
+
var m = match(/^@page */);
|
|
415
|
+
if (!m) return;
|
|
416
|
+
|
|
417
|
+
var sel = selector() || [];
|
|
418
|
+
|
|
419
|
+
if (!open()) return error("@page missing '{'");
|
|
420
|
+
var decls = comments();
|
|
421
|
+
|
|
422
|
+
// declarations
|
|
423
|
+
var decl;
|
|
424
|
+
while (decl = declaration()) {
|
|
425
|
+
decls.push(decl);
|
|
426
|
+
decls = decls.concat(comments());
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
if (!close()) return error("@page missing '}'");
|
|
430
|
+
|
|
431
|
+
return pos({
|
|
432
|
+
type: 'page',
|
|
433
|
+
selectors: sel,
|
|
434
|
+
declarations: decls
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Parse document.
|
|
440
|
+
*/
|
|
441
|
+
|
|
442
|
+
function atdocument() {
|
|
443
|
+
var pos = position();
|
|
444
|
+
var m = match(/^@([-\w]+)?document *([^{]+)/);
|
|
445
|
+
if (!m) return;
|
|
446
|
+
|
|
447
|
+
var vendor = trim(m[1]);
|
|
448
|
+
var doc = trim(m[2]);
|
|
449
|
+
|
|
450
|
+
if (!open()) return error("@document missing '{'");
|
|
451
|
+
|
|
452
|
+
var style = comments().concat(rules());
|
|
453
|
+
|
|
454
|
+
if (!close()) return error("@document missing '}'");
|
|
455
|
+
|
|
456
|
+
return pos({
|
|
457
|
+
type: 'document',
|
|
458
|
+
document: doc,
|
|
459
|
+
vendor: vendor,
|
|
460
|
+
rules: style
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Parse font-face.
|
|
466
|
+
*/
|
|
467
|
+
|
|
468
|
+
function atfontface() {
|
|
469
|
+
var pos = position();
|
|
470
|
+
var m = match(/^@font-face\s*/);
|
|
471
|
+
if (!m) return;
|
|
472
|
+
|
|
473
|
+
if (!open()) return error("@font-face missing '{'");
|
|
474
|
+
var decls = comments();
|
|
475
|
+
|
|
476
|
+
// declarations
|
|
477
|
+
var decl;
|
|
478
|
+
while (decl = declaration()) {
|
|
479
|
+
decls.push(decl);
|
|
480
|
+
decls = decls.concat(comments());
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
if (!close()) return error("@font-face missing '}'");
|
|
484
|
+
|
|
485
|
+
return pos({
|
|
486
|
+
type: 'font-face',
|
|
487
|
+
declarations: decls
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Parse import
|
|
493
|
+
*/
|
|
494
|
+
|
|
495
|
+
var atimport = _compileAtrule('import');
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Parse charset
|
|
499
|
+
*/
|
|
500
|
+
|
|
501
|
+
var atcharset = _compileAtrule('charset');
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Parse namespace
|
|
505
|
+
*/
|
|
506
|
+
|
|
507
|
+
var atnamespace = _compileAtrule('namespace');
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Parse non-block at-rules
|
|
511
|
+
*/
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
function _compileAtrule(name) {
|
|
515
|
+
var re = new RegExp('^@' + name + '\\s*([^;]+);');
|
|
516
|
+
return function() {
|
|
517
|
+
var pos = position();
|
|
518
|
+
var m = match(re);
|
|
519
|
+
if (!m) return;
|
|
520
|
+
var ret = { type: name };
|
|
521
|
+
ret[name] = m[1].trim();
|
|
522
|
+
return pos(ret);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Parse at rule.
|
|
528
|
+
*/
|
|
529
|
+
|
|
530
|
+
function atrule() {
|
|
531
|
+
if (css[0] != '@') return;
|
|
532
|
+
|
|
533
|
+
return atkeyframes()
|
|
534
|
+
|| atmedia()
|
|
535
|
+
|| atcustommedia()
|
|
536
|
+
|| atsupports()
|
|
537
|
+
|| atimport()
|
|
538
|
+
|| atcharset()
|
|
539
|
+
|| atnamespace()
|
|
540
|
+
|| atdocument()
|
|
541
|
+
|| atpage()
|
|
542
|
+
|| athost()
|
|
543
|
+
|| atfontface();
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Parse rule.
|
|
548
|
+
*/
|
|
549
|
+
|
|
550
|
+
function rule() {
|
|
551
|
+
var pos = position();
|
|
552
|
+
var sel = selector();
|
|
553
|
+
|
|
554
|
+
if (!sel) return error('selector missing');
|
|
555
|
+
comments();
|
|
556
|
+
|
|
557
|
+
return pos({
|
|
558
|
+
type: 'rule',
|
|
559
|
+
selectors: sel,
|
|
560
|
+
declarations: declarations()
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
return addParent(stylesheet());
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Trim `str`.
|
|
569
|
+
*/
|
|
570
|
+
|
|
571
|
+
function trim(str) {
|
|
572
|
+
return str ? str.replace(/^\s+|\s+$/g, '') : '';
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Adds non-enumerable parent node reference to each node.
|
|
577
|
+
*/
|
|
578
|
+
|
|
579
|
+
function addParent(obj, parent) {
|
|
580
|
+
var isNode = obj && typeof obj.type === 'string';
|
|
581
|
+
var childParent = isNode ? obj : parent;
|
|
582
|
+
|
|
583
|
+
for (var k in obj) {
|
|
584
|
+
var value = obj[k];
|
|
585
|
+
if (Array.isArray(value)) {
|
|
586
|
+
value.forEach(function(v) { addParent(v, childParent); });
|
|
587
|
+
} else if (value && typeof value === 'object') {
|
|
588
|
+
addParent(value, childParent);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
if (isNode) {
|
|
593
|
+
Object.defineProperty(obj, 'parent', {
|
|
594
|
+
configurable: true,
|
|
595
|
+
writable: true,
|
|
596
|
+
enumerable: false,
|
|
597
|
+
value: parent || null
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
return obj;
|
|
602
|
+
}
|
package/css/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "css",
|
|
3
|
+
"version": "2.2.1",
|
|
4
|
+
"description": "CSS parser / stringifier",
|
|
5
|
+
"main": "reworkcss",
|
|
6
|
+
"types": "reworkcss.d.ts",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"source-map": "^0.1.38",
|
|
9
|
+
"source-map-resolve": "^0.3.0",
|
|
10
|
+
"urix": "^0.1.0",
|
|
11
|
+
"inherits": "^2.0.1"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"mocha": "^1.21.3",
|
|
15
|
+
"should": "^4.0.4",
|
|
16
|
+
"matcha": "^0.5.0",
|
|
17
|
+
"bytes": "^1.0.0"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"benchmark": "matcha",
|
|
21
|
+
"test": "mocha --require should --reporter spec --bail test/*.js"
|
|
22
|
+
},
|
|
23
|
+
"author": "TJ Holowaychuk <tj@vision-media.ca>",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/reworkcss/css.git"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"css",
|
|
31
|
+
"parser",
|
|
32
|
+
"stringifier",
|
|
33
|
+
"stylesheet"
|
|
34
|
+
],
|
|
35
|
+
"nativescript": {}
|
|
36
|
+
}
|