@breakside/jskit 2024.22.0 → 2024.25.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/Frameworks/DOM.jsframework/Info.json +2 -2
- package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
- package/Frameworks/FontKit.jsframework/Info.json +2 -2
- package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/Info.json +2 -2
- package/Frameworks/Foundation.jsframework/JS/JSAttributedString.js +32 -0
- package/Frameworks/Foundation.jsframework/JS/JSHTMLTextParser.js +584 -0
- package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/sources.json +3 -0
- package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
- package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
- package/Info.json +2 -2
- package/Node/io.breakside.jskit-bundle.js +2 -2
- package/Node/jskit +1 -0
- package/Root/Frameworks/APIKit/Info.yaml +1 -1
- package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/AuthKit/Info.yaml +1 -1
- package/Root/Frameworks/CSSOM/Info.yaml +1 -1
- package/Root/Frameworks/ChartKit/Info.yaml +1 -1
- package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
- package/Root/Frameworks/DBKit/Info.yaml +1 -1
- package/Root/Frameworks/DOM/Info.yaml +1 -1
- package/Root/Frameworks/Dispatch/Info.yaml +1 -1
- package/Root/Frameworks/FontKit/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/JSAttributedString.js +32 -0
- package/Root/Frameworks/Foundation/JSHTMLTextParser.js +584 -0
- package/Root/Frameworks/ImageKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
- package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
- package/Root/Frameworks/PDFKit/Info.yaml +1 -1
- package/Root/Frameworks/QRKit/Info.yaml +1 -1
- package/Root/Frameworks/SearchKit/Info.yaml +1 -1
- package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/TestKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/JSColor+UIKit.js +14 -9
- package/Root/Frameworks/UIKit/UINavigationBar.js +7 -0
- package/Root/Frameworks/UIKit/UIPopupButton.js +18 -0
- package/Root/Frameworks/UIKit/UIWindow.js +4 -0
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/package.json +1 -1
|
@@ -30,13 +30,17 @@ JSColor.definePropertiesFromExtensions({
|
|
|
30
30
|
JSColor.defineInitMethod("initWithUIStyles");
|
|
31
31
|
|
|
32
32
|
// Common Colors
|
|
33
|
-
JSColorSpace.ui.setStylesForName("background", JSColor.white, JSColor.initWithWhite(0.15));
|
|
34
|
-
JSColorSpace.ui.setStylesForName("
|
|
35
|
-
JSColorSpace.ui.setStylesForName("
|
|
36
|
-
JSColorSpace.ui.setStylesForName("
|
|
37
|
-
JSColorSpace.ui.setStylesForName("
|
|
38
|
-
JSColorSpace.ui.setStylesForName("
|
|
39
|
-
JSColorSpace.ui.
|
|
33
|
+
JSColorSpace.ui.setStylesForName("background", JSColor.white, JSColor.initWithWhite(0.15), JSColor.white, JSColor.initWithWhite(0.15));
|
|
34
|
+
JSColorSpace.ui.setStylesForName("shadedBackground", JSColor.initWithWhite(0.85), JSColor.initWithWhite(0.30), JSColor.white.colorDarkenedByPercentage(0.2), JSColor.black.colorLightenedByPercentage(0.3));
|
|
35
|
+
JSColorSpace.ui.setStylesForName("secondaryShadedBackground", JSColor.initWithWhite(0.965), JSColor.initWithWhite(0.25), JSColor.white, JSColor.black);
|
|
36
|
+
JSColorSpace.ui.setStylesForName("separator", JSColor.initWithWhite(0.85), JSColor.initWithWhite(0.30), JSColor.initWithWhite(0.5), JSColor.initWithWhite(0.5));
|
|
37
|
+
JSColorSpace.ui.setStylesForName("secondarySeparator", JSColor.initWithWhite(0.965), JSColor.initWithWhite(0.25), JSColor.initWithWhite(0.5), JSColor.initWithWhite(0.5));
|
|
38
|
+
JSColorSpace.ui.setStylesForName("text", JSColor.black.colorWithAlpha(0.9), JSColor.white.colorWithAlpha(0.9), JSColor.black, JSColor.white);
|
|
39
|
+
JSColorSpace.ui.setStylesForName("secondaryText", JSColor.black.colorWithAlpha(0.6), JSColor.white.colorWithAlpha(0.6), JSColor.black, JSColor.white);
|
|
40
|
+
JSColorSpace.ui.setStylesForName("highlight", JSColor.initWithRGBA(0, 0.5, 1), JSColor.initWithRGBA(0, 0.5, 1), JSColor.initWithRGBA(0, 0.5, 1), JSColor.initWithRGBA(0, 0.5, 1));
|
|
41
|
+
JSColorSpace.ui.setStylesForName("mutedHighlight", JSColor.black.colorWithAlpha(0.15), JSColor.white.colorWithAlpha(0.1), JSColor.black.colorWithAlpha(0.4), JSColor.white.colorWithAlpha(0.3));
|
|
42
|
+
JSColorSpace.ui.setStylesForName("highlightedText", JSColor.white, JSColor.white, JSColor.white, JSColor.white);
|
|
43
|
+
JSColorSpace.ui.setColorForName("placeholderText", JSColor.black.colorWithAlpha(0.3), JSColor.white.colorWithAlpha(0.3), JSColor.black.colorWithAlpha(0.7), JSColor.white.colorWithAlpha(0.7));
|
|
40
44
|
JSColorSpace.ui.setStylesForName("destructive", JSColor.initWithRGBA(0.8,0,0), JSColor.initWithRGBA(1,0.5,0.5));
|
|
41
45
|
|
|
42
46
|
// Control Colors
|
|
@@ -58,14 +62,15 @@ JSColorSpace.ui.setStylesForName("disabledControlTitle", JSColor.initWithWhite(0
|
|
|
58
62
|
JSColorSpace.ui.setColorForName("controlShadow", JSColor.black.colorWithAlpha(0.1));
|
|
59
63
|
|
|
60
64
|
// Window Colors
|
|
61
|
-
JSColorSpace.ui.setStylesForName("window", JSColor.initWithWhite(0.94), JSColor.initWithWhite(0.2));
|
|
65
|
+
JSColorSpace.ui.setStylesForName("window", JSColor.initWithWhite(0.94), JSColor.initWithWhite(0.2), JSColor.white, JSColor.initWithWhite(0.2));
|
|
66
|
+
JSColorSpace.ui.setStylesForName("windowBorder", JSColor.clear, JSColor.white.colorWithAlpha(0.1), JSColor.black, JSColor.white);
|
|
62
67
|
JSColorSpace.ui.setColorForName("windowShadow", JSColor.black.colorWithAlpha(0.4));
|
|
63
68
|
JSColorSpace.ui.setColorForName("toolbarTitle", JSColor.text.colorWithAlpha(0.6));
|
|
64
69
|
|
|
65
70
|
// Tooltip Colors
|
|
66
71
|
JSColorSpace.ui.setColorForName("tooltip", JSColor.window);
|
|
67
72
|
JSColorSpace.ui.setColorForName("tooltipText", JSColor.text);
|
|
68
|
-
JSColorSpace.ui.setStylesForName("tooltipBorder", JSColor.initWithWhite(0.7), JSColor.black);
|
|
73
|
+
JSColorSpace.ui.setStylesForName("tooltipBorder", JSColor.initWithWhite(0.7), JSColor.black, JSColor.black, JSColor.white);
|
|
69
74
|
JSColorSpace.ui.setColorForName("tooltipShadow", JSColor.black.colorWithAlpha(0.2));
|
|
70
75
|
|
|
71
76
|
// Menu Colors
|
|
@@ -309,6 +309,7 @@ JSClass("UINavigationBarDefaultStyler", UINavigationBarStyler, {
|
|
|
309
309
|
disabledItemColor: null,
|
|
310
310
|
itemInsets: null,
|
|
311
311
|
itemTitleInsets: null,
|
|
312
|
+
itemSpacing: 0,
|
|
312
313
|
backButtonTitleInsets: null,
|
|
313
314
|
backButtonImage: null,
|
|
314
315
|
backButtonColor: null,
|
|
@@ -738,6 +739,9 @@ JSClass("UINavigationBarDefaultStyler", UINavigationBarStyler, {
|
|
|
738
739
|
xLeft = this.titleInsets.left;
|
|
739
740
|
}
|
|
740
741
|
for (i = 0, l = props.leftBarItemViews.length; i < l; ++i){
|
|
742
|
+
if (i > 0){
|
|
743
|
+
xLeft += this.itemSpacing;
|
|
744
|
+
}
|
|
741
745
|
barItemView = props.leftBarItemViews[i];
|
|
742
746
|
barItemView.sizeToFitSize(JSSize(xRight - xLeft, itemHeight));
|
|
743
747
|
barItemView.untransformedFrame = JSRect(JSPoint(xLeft, y + (itemHeight - barItemView.bounds.size.height) / 2), barItemView.bounds.size);
|
|
@@ -749,6 +753,9 @@ JSClass("UINavigationBarDefaultStyler", UINavigationBarStyler, {
|
|
|
749
753
|
xRight -= barItemView.bounds.size.width;
|
|
750
754
|
barItemView.untransformedFrame = JSRect(JSPoint(xRight, y + (itemHeight - barItemView.bounds.size.height) / 2), barItemView.bounds.size);
|
|
751
755
|
barItemView.hidden = xRight < xLeft;
|
|
756
|
+
if (i > 0){
|
|
757
|
+
xRight -= this.itemSpacing;
|
|
758
|
+
}
|
|
752
759
|
}
|
|
753
760
|
|
|
754
761
|
var availableTitleWidth = xRight - xLeft;
|
|
@@ -797,6 +797,11 @@ JSClass("UIPopupButtonImageStyler", UIPopupButtonStyler, {
|
|
|
797
797
|
overBackgroundColor: null,
|
|
798
798
|
cornerRadius: 0,
|
|
799
799
|
titleInsets: null,
|
|
800
|
+
normalBorderColor: null,
|
|
801
|
+
disabledBorderColor: null,
|
|
802
|
+
overBorderColor: null,
|
|
803
|
+
activeBorderColor: null,
|
|
804
|
+
borderWidth: 0,
|
|
800
805
|
|
|
801
806
|
init: function(){
|
|
802
807
|
this.initWithColor(JSColor.text);
|
|
@@ -863,6 +868,14 @@ JSClass("UIPopupButtonImageStyler", UIPopupButtonStyler, {
|
|
|
863
868
|
this.disabledBackgroundColor = this.normalBackgroundColor.colorWithAlpha(0.5);
|
|
864
869
|
}
|
|
865
870
|
}
|
|
871
|
+
if (this.normalBorderColor !== null){
|
|
872
|
+
if (this.activeBorderColor === null){
|
|
873
|
+
this.activeBorderColor = this.normalBorderColor.colorDarkenedByPercentage(0.2);
|
|
874
|
+
}
|
|
875
|
+
if (this.disabledBorderColor === null){
|
|
876
|
+
this.disabledBorderColor = this.normalBorderColor.colorWithAlpha(0.5);
|
|
877
|
+
}
|
|
878
|
+
}
|
|
866
879
|
},
|
|
867
880
|
|
|
868
881
|
initializeControl: function(button){
|
|
@@ -875,6 +888,7 @@ JSClass("UIPopupButtonImageStyler", UIPopupButtonStyler, {
|
|
|
875
888
|
button._imageView.hidden = false;
|
|
876
889
|
button.cornerRadius = this.cornerRadius;
|
|
877
890
|
button.titleInsets = this.titleInsets;
|
|
891
|
+
button.borderWidth = this.borderWidth;
|
|
878
892
|
this.updateControl(button);
|
|
879
893
|
},
|
|
880
894
|
|
|
@@ -882,15 +896,19 @@ JSClass("UIPopupButtonImageStyler", UIPopupButtonStyler, {
|
|
|
882
896
|
if (!button.enabled){
|
|
883
897
|
button._imageView.templateColor = this.disabledColor;
|
|
884
898
|
button.backgroundColor = this.normalBackgroundColor;
|
|
899
|
+
button.borderColor = this.normalBorderColor;
|
|
885
900
|
}else if (button.active){
|
|
886
901
|
button._imageView.templateColor = this.activeColor;
|
|
887
902
|
button.backgroundColor = this.activeBackgroundColor;
|
|
903
|
+
button.borderColor = this.activeBorderColor;
|
|
888
904
|
}else{
|
|
889
905
|
button._imageView.templateColor = this.normalColor;
|
|
890
906
|
if (this.showsOverState && button.over){
|
|
891
907
|
button.backgroundColor = this.overBackgroundColor;
|
|
908
|
+
button.borderColor = this.overBorderColor;
|
|
892
909
|
}else{
|
|
893
910
|
button.backgroundColor = this.normalBackgroundColor;
|
|
911
|
+
button.borderColor = this.normalBorderColor;
|
|
894
912
|
}
|
|
895
913
|
}
|
|
896
914
|
},
|
|
@@ -1458,6 +1458,8 @@ JSClass("UIWindowDefaultStyler", UIWindowStyler, {
|
|
|
1458
1458
|
window.shadowRadius = this.shadowRadius;
|
|
1459
1459
|
window.cornerRadius = this.cornerRadius;
|
|
1460
1460
|
window.backgroundColor = this.backgroundColor;
|
|
1461
|
+
window.borderWidth = 1;
|
|
1462
|
+
window.borderColor = JSColor.windowBorder;
|
|
1461
1463
|
|
|
1462
1464
|
this.updateWindow(window);
|
|
1463
1465
|
},
|
|
@@ -1677,6 +1679,8 @@ JSClass("UIWindowTitlelessStyler", UIWindowStyler, {
|
|
|
1677
1679
|
window.shadowRadius = this.shadowRadius;
|
|
1678
1680
|
window.cornerRadius = this.cornerRadius;
|
|
1679
1681
|
window.backgroundColor = this.backgroundColor;
|
|
1682
|
+
window.borderWidth = 1;
|
|
1683
|
+
window.borderColor = JSColor.windowBorder;
|
|
1680
1684
|
|
|
1681
1685
|
this.updateWindow(window);
|
|
1682
1686
|
},
|