@breakside/jskit 2022.9.0 → 2022.22.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/JS/FNTFontDescriptor.js +9 -6
- 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/JSEnvironment.js +5 -0
- package/Frameworks/Foundation.jsframework/JS/JSHTMLHTTPClient.js +9 -1
- package/Frameworks/Foundation.jsframework/JS/JSImage.js +11 -4
- package/Frameworks/Foundation.jsframework/JS/JSSynchronizer.js +1 -0
- package/Frameworks/Foundation.jsframework/JS/JSURLResponse.js +10 -0
- package/Frameworks/Foundation.jsframework/JS/JSUserDefaults.js +14 -1
- package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
- 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/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/FNTFontDescriptor.js +9 -6
- package/Root/Frameworks/FontKit/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/JSEnvironment.js +5 -0
- package/Root/Frameworks/Foundation/JSHTMLHTTPClient.js +9 -1
- package/Root/Frameworks/Foundation/JSImage.js +11 -4
- package/Root/Frameworks/Foundation/JSSynchronizer.js +1 -0
- package/Root/Frameworks/Foundation/JSURLResponse.js +10 -0
- package/Root/Frameworks/Foundation/JSUserDefaults.js +14 -1
- 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/UIApplication.js +15 -1
- package/Root/Frameworks/UIKit/UICollectionReusableView.js +1 -1
- package/Root/Frameworks/UIKit/UICollectionView.js +99 -13
- package/Root/Frameworks/UIKit/UICollectionViewCell.js +11 -1
- package/Root/Frameworks/UIKit/UICollectionViewLayout.js +1 -1
- package/Root/Frameworks/UIKit/UIColorPanel.js +4 -1
- package/Root/Frameworks/UIKit/UIDraggingSession.js +7 -0
- package/Root/Frameworks/UIKit/UIHTMLTextField.js +3 -1
- package/Root/Frameworks/UIKit/UIHTMLWindowServer.js +13 -1
- package/Root/Frameworks/UIKit/UIMenu.js +12 -5
- package/Root/Frameworks/UIKit/UIMenuItem.js +6 -0
- package/Root/Frameworks/UIKit/UIMenuView.js +12 -1
- package/Root/Frameworks/UIKit/UIPressGestureRecognizer.js +13 -2
- package/Root/Frameworks/UIKit/UIScrollView.js +15 -12
- package/Root/Frameworks/UIKit/UISegmentedControl.js +15 -0
- package/Root/Frameworks/UIKit/UISlider.js +9 -0
- package/Root/Frameworks/UIKit/UIStackView.js +16 -0
- package/Root/Frameworks/UIKit/UITabView.js +5 -6
- package/Root/Frameworks/UIKit/UITextField.js +2 -0
- package/Root/Frameworks/UIKit/UIView.js +1 -1
- package/Root/Frameworks/UIKit/UIWindow.js +32 -1
- package/Root/Frameworks/UIKit/UIWindowServer.js +3 -0
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/package.json +1 -1
|
@@ -29,6 +29,7 @@ JSClass("UISlider", UIControl, {
|
|
|
29
29
|
minimumValue: JSDynamicProperty("_minimumValue", 0),
|
|
30
30
|
maximumValue: JSDynamicProperty("_maximumValue", 1),
|
|
31
31
|
value: JSDynamicProperty("_value", 0),
|
|
32
|
+
integerValue: JSDynamicProperty(),
|
|
32
33
|
|
|
33
34
|
setMinimumValue: function(minimumValue){
|
|
34
35
|
this._minimumValue = minimumValue;
|
|
@@ -53,6 +54,14 @@ JSClass("UISlider", UIControl, {
|
|
|
53
54
|
this.setNeedsLayout();
|
|
54
55
|
},
|
|
55
56
|
|
|
57
|
+
getIntegerValue: function(){
|
|
58
|
+
return Math.round(this._value);
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
setIntegerValue: function(value){
|
|
62
|
+
this.value = value;
|
|
63
|
+
},
|
|
64
|
+
|
|
56
65
|
minimumPoint: JSReadOnlyProperty(),
|
|
57
66
|
maximumPoint: JSReadOnlyProperty(),
|
|
58
67
|
|
|
@@ -215,6 +215,22 @@ JSClass("UIStackView", UIView, {
|
|
|
215
215
|
|
|
216
216
|
subviewsDidChange: function(){
|
|
217
217
|
this.setNeedsLayout();
|
|
218
|
+
},
|
|
219
|
+
|
|
220
|
+
getFirstBaselineOffsetFromTop: function(){
|
|
221
|
+
var top = this._contentInsets.top;
|
|
222
|
+
if (this._arrangedSubviews.length > 0){
|
|
223
|
+
top += this._arrangedSubviews[0].firstBaselineOffsetFromTop;
|
|
224
|
+
}
|
|
225
|
+
return top;
|
|
226
|
+
},
|
|
227
|
+
|
|
228
|
+
getLastBaselineOffsetFromBottom: function(){
|
|
229
|
+
var bottom = this._contentInsets.bottom;
|
|
230
|
+
if (this._arrangedSubviews.length > 0){
|
|
231
|
+
bottom += this._arrangedSubviews[this._arrangedSubviews.length - 1].lastBaselineOffsetFromBottom;
|
|
232
|
+
}
|
|
233
|
+
return bottom;
|
|
218
234
|
}
|
|
219
235
|
|
|
220
236
|
});
|
|
@@ -59,16 +59,14 @@ JSClass("UITabView", UIView, {
|
|
|
59
59
|
if (spec.containsKey('delegate')){
|
|
60
60
|
this.delegate = spec.valueForKey("delegate");
|
|
61
61
|
}
|
|
62
|
+
if (spec.containsKey("font")){
|
|
63
|
+
this.font = spec.valueForKey("font", JSFont);
|
|
64
|
+
}
|
|
62
65
|
if (spec.containsKey('items')){
|
|
63
|
-
var items = [];
|
|
64
66
|
var specItems = spec.valueForKey('items');
|
|
65
67
|
for (var i = 0, l = specItems.length; i < l; ++i){
|
|
66
|
-
|
|
68
|
+
this.insertItemAtIndex(specItems.valueForKey(i, UITabViewItem), i);
|
|
67
69
|
}
|
|
68
|
-
this.items = items;
|
|
69
|
-
}
|
|
70
|
-
if (spec.containsKey("font")){
|
|
71
|
-
this.font = spec.valueForKey("font", JSFont);
|
|
72
70
|
}
|
|
73
71
|
},
|
|
74
72
|
|
|
@@ -1067,6 +1065,7 @@ JSClass("UITabViewTablessStyler", UITabViewStyler, {
|
|
|
1067
1065
|
showContentViewInTabView: function(contentView, tabView){
|
|
1068
1066
|
tabView.addSubview(contentView);
|
|
1069
1067
|
tabView.stylerProperties.contentView = contentView;
|
|
1068
|
+
this.layoutTabView(tabView);
|
|
1070
1069
|
},
|
|
1071
1070
|
|
|
1072
1071
|
removeContentViewFromTabView: function(contentView, tabView){
|
|
@@ -159,6 +159,7 @@ JSClass("UITextField", UIControl, {
|
|
|
159
159
|
}else{
|
|
160
160
|
this._textLayer.text = text;
|
|
161
161
|
}
|
|
162
|
+
this.setNeedsLayout();
|
|
162
163
|
this._updateIsEmpty(!this._textLayer.hasText());
|
|
163
164
|
},
|
|
164
165
|
|
|
@@ -172,6 +173,7 @@ JSClass("UITextField", UIControl, {
|
|
|
172
173
|
return;
|
|
173
174
|
}
|
|
174
175
|
this._textLayer.attributedText = attributedText;
|
|
176
|
+
this.setNeedsLayout();
|
|
175
177
|
this._updateIsEmpty(!this._textLayer.hasText());
|
|
176
178
|
},
|
|
177
179
|
|
|
@@ -896,7 +896,17 @@ JSClass('UIWindow', UIView, {
|
|
|
896
896
|
},
|
|
897
897
|
|
|
898
898
|
_sendTouchEvent: function(event){
|
|
899
|
-
|
|
899
|
+
var modal = this._modal;
|
|
900
|
+
while (modal !== null && modal._modal !== null){
|
|
901
|
+
modal = modal._modal;
|
|
902
|
+
}
|
|
903
|
+
if (modal !== null){
|
|
904
|
+
if (event.type == UIEvent.Type.touchesBegan){
|
|
905
|
+
if (modal._isOpen){
|
|
906
|
+
modal.makeKeyAndOrderFront();
|
|
907
|
+
modal.indicateModalStatus();
|
|
908
|
+
}
|
|
909
|
+
}
|
|
900
910
|
return;
|
|
901
911
|
}
|
|
902
912
|
var i, l;
|
|
@@ -1148,7 +1158,18 @@ JSClass("UIWindowStyler", JSObject, {
|
|
|
1148
1158
|
window.layer.addSublayer(window.stylerProperties.focusRingLayer);
|
|
1149
1159
|
},
|
|
1150
1160
|
|
|
1161
|
+
_isUpdatingFocusRing: false,
|
|
1162
|
+
|
|
1151
1163
|
updateFocusRingInWindow: function(window, animated){
|
|
1164
|
+
if (this._isUpdatingFocusRing){
|
|
1165
|
+
return;
|
|
1166
|
+
}
|
|
1167
|
+
this._isUpdatingFocusRing = true;
|
|
1168
|
+
this._updateFocusRingInWindow(window, animated);
|
|
1169
|
+
this._isUpdatingFocusRing = false;
|
|
1170
|
+
},
|
|
1171
|
+
|
|
1172
|
+
_updateFocusRingInWindow: function(window, animated){
|
|
1152
1173
|
var responder = window.firstResponder;
|
|
1153
1174
|
var focusRingLayer = window.stylerProperties.focusRingLayer;
|
|
1154
1175
|
if (!window.isKeyWindow || responder === null || !responder.isKindOfClass(UIView)){
|
|
@@ -1156,6 +1177,16 @@ JSClass("UIWindowStyler", JSObject, {
|
|
|
1156
1177
|
return;
|
|
1157
1178
|
}
|
|
1158
1179
|
var view = responder;
|
|
1180
|
+
var views = [];
|
|
1181
|
+
while (view !== window){
|
|
1182
|
+
views.push(view);
|
|
1183
|
+
view = view.superview;
|
|
1184
|
+
}
|
|
1185
|
+
view = responder;
|
|
1186
|
+
var i;
|
|
1187
|
+
for (i = views.length - 1; i >= 0; --i){
|
|
1188
|
+
views[i].layoutIfNeeded();
|
|
1189
|
+
}
|
|
1159
1190
|
var path = view.focusRingPath;
|
|
1160
1191
|
if (path === null){
|
|
1161
1192
|
focusRingLayer.hidden = true;
|