@triniwiz/nativescript-masonkit 1.0.0-beta.100 → 1.0.0-beta.101
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/button/index.windows.d.ts +9 -3
- package/button/index.windows.js +57 -1
- package/button/index.windows.js.map +1 -1
- package/common.js +35 -0
- package/common.js.map +1 -1
- package/package.json +1 -1
- package/platforms/android/masonkit-release.aar +0 -0
- package/platforms/ios/Mason.xcframework/Info.plist +9 -9
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +3422 -11761
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8206 -8161
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +3422 -11761
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +3422 -11761
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +12 -12
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8200 -8155
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +7840 -7796
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-xros.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.abi.json +3422 -11761
- package/platforms/ios/Mason.xcframework/xros-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +7000 -6954
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-xros-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.abi.json +3422 -11761
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/_CodeSignature/CodeResources +6 -6
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +7000 -6954
- package/platforms/windows/arm64/NativeScript.Mason.dll +0 -0
- package/platforms/windows/arm64/NativeScript.Mason.winmd +0 -0
- package/platforms/windows/x64/NativeScript.Mason.dll +0 -0
- package/platforms/windows/x64/NativeScript.Mason.winmd +0 -0
- package/style.d.ts +6 -0
- package/style.js +15 -6
- package/style.js.map +1 -1
- package/text/index.windows.js +2 -2
- package/text/index.windows.js.map +1 -1
- package/tree/index.windows.d.ts +1 -1
- package/tree/index.windows.js +1 -1
- package/tree/index.windows.js.map +1 -1
- package/typings/windows.d.ts +9 -2
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/style.d.ts
CHANGED
|
@@ -110,6 +110,12 @@ declare class StateKeys {
|
|
|
110
110
|
and(other: StateKeys): StateKeys;
|
|
111
111
|
hasFlag(flag: StateKeys): boolean;
|
|
112
112
|
}
|
|
113
|
+
export declare function parseLinearGradientCss(value: string): {
|
|
114
|
+
angle: number;
|
|
115
|
+
offsets: number[];
|
|
116
|
+
colors: number[];
|
|
117
|
+
interpolation: string;
|
|
118
|
+
} | null;
|
|
113
119
|
/** 1-4 lengths, percentages or `auto`. Anything else makes the whole declaration invalid, which CSS ignores. */
|
|
114
120
|
export declare function isSideList(value: string): boolean;
|
|
115
121
|
/** One Windows border-radius corner in the buffer's encoding: type 0 = dip, 1 = percent as a 0-1 fraction. */
|
package/style.js
CHANGED
|
@@ -715,8 +715,9 @@ function parseGradientAngle(token) {
|
|
|
715
715
|
const LINEAR_GRADIENT = /linear-gradient/i;
|
|
716
716
|
const ANY_GRADIENT = /gradient/i;
|
|
717
717
|
const LINEAR_GRADIENT_ARGS = /linear-gradient\s*\(([\s\S]*)\)\s*$/i;
|
|
718
|
-
|
|
719
|
-
|
|
718
|
+
const INTERPOLATION_METHOD = /(?:^|\s)in\s+([a-z][a-z0-9-]*(?:\s+(?:shorter|longer|increasing|decreasing)\s+hue)?)(?=\s|$)/i;
|
|
719
|
+
// Parse `linear-gradient(<dir>? <in colorspace>?, <color> <stop>?, ...)` into a CSS angle, per-stop argb + offsets and the interpolation.
|
|
720
|
+
export function parseLinearGradientCss(value) {
|
|
720
721
|
const m = LINEAR_GRADIENT_ARGS.exec(value.trim());
|
|
721
722
|
if (!m)
|
|
722
723
|
return null;
|
|
@@ -727,8 +728,16 @@ function parseLinearGradientCss(value) {
|
|
|
727
728
|
return null;
|
|
728
729
|
let angle = 180;
|
|
729
730
|
let start = 0;
|
|
730
|
-
|
|
731
|
-
|
|
731
|
+
let head = parts[0];
|
|
732
|
+
let interpolation = '';
|
|
733
|
+
const method = INTERPOLATION_METHOD.exec(head);
|
|
734
|
+
if (method) {
|
|
735
|
+
interpolation = method[1].toLowerCase().replace(/\s+/g, ' ');
|
|
736
|
+
head = (head.slice(0, method.index) + head.slice(method.index + method[0].length)).trim();
|
|
737
|
+
start = 1;
|
|
738
|
+
}
|
|
739
|
+
if (/^(to\s|-?[\d.]+(deg|rad|turn))/i.test(head)) {
|
|
740
|
+
angle = parseGradientAngle(head);
|
|
732
741
|
start = 1;
|
|
733
742
|
}
|
|
734
743
|
const colors = [];
|
|
@@ -746,7 +755,7 @@ function parseLinearGradientCss(value) {
|
|
|
746
755
|
}
|
|
747
756
|
if (colors.length < 1)
|
|
748
757
|
return null;
|
|
749
|
-
return { angle, offsets: resolveStopPositions(positions), colors };
|
|
758
|
+
return { angle, offsets: resolveStopPositions(positions), colors, interpolation };
|
|
750
759
|
}
|
|
751
760
|
const SIDE_TOKEN = /^(auto|[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?(px|dip|dppx|rem|em|pt|vw|vh|vmin|vmax|%)?|[a-z-]+\(.*\))$/i;
|
|
752
761
|
/** 1-4 lengths, percentages or `auto`. Anything else makes the whole declaration invalid, which CSS ignores. */
|
|
@@ -1310,7 +1319,7 @@ export class Style {
|
|
|
1310
1319
|
// Pass stops as an "offset:argb,..." string — WinRT array_view params don't marshal
|
|
1311
1320
|
// reliably from the NS-Windows JS runtime (plain arrays -> E_FAIL, typed arrays -> crash).
|
|
1312
1321
|
const stops = g.offsets.map((o, i) => o + ':' + (g.colors[i] >>> 0)).join(',');
|
|
1313
|
-
NativeScript.Mason.Css.ApplyLinearGradient(this.nativeView, g.angle, stops);
|
|
1322
|
+
NativeScript.Mason.Css.ApplyLinearGradient(this.nativeView, g.angle, stops, g.interpolation);
|
|
1314
1323
|
}
|
|
1315
1324
|
catch (_) { }
|
|
1316
1325
|
}
|