@breakside/jskit 2021.36.0 → 2021.39.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.
Files changed (105) hide show
  1. package/Frameworks/DOM.jsframework/Info.json +2 -2
  2. package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
  3. package/Frameworks/FontKit.jsframework/Info.json +2 -2
  4. package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
  5. package/Frameworks/Foundation.jsframework/Info.json +2 -2
  6. package/Frameworks/Foundation.jsframework/JS/JSColor+HTML.js +11 -2
  7. package/Frameworks/Foundation.jsframework/JS/JSColor.js +62 -26
  8. package/Frameworks/Foundation.jsframework/JS/JSColorSpace.js +209 -1
  9. package/Frameworks/Foundation.jsframework/JS/JSSpec.js +1 -1
  10. package/Frameworks/Foundation.jsframework/JS/JSSynchronizer.js +9 -1
  11. package/Frameworks/Foundation.jsframework/JS/JSURL.js +42 -3
  12. package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
  13. package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
  14. package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
  15. package/Info.json +2 -2
  16. package/Node/HTMLBuilder.js +10 -10
  17. package/Node/NodeBuilder.js +10 -7
  18. package/Node/io.breakside.jskit-bundle.js +4 -4
  19. package/Resources/doc-default.css +86 -0
  20. package/Root/Frameworks/APIKit/Info.yaml +1 -1
  21. package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
  22. package/Root/Frameworks/AuthKit/Info.yaml +1 -1
  23. package/Root/Frameworks/CSSOM/Info.yaml +1 -1
  24. package/Root/Frameworks/ChartKit/Info.yaml +1 -1
  25. package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
  26. package/Root/Frameworks/DBKit/Info.yaml +1 -1
  27. package/Root/Frameworks/DOM/Info.yaml +1 -1
  28. package/Root/Frameworks/Dispatch/Info.yaml +1 -1
  29. package/Root/Frameworks/FontKit/Info.yaml +1 -1
  30. package/Root/Frameworks/Foundation/Info.yaml +1 -1
  31. package/Root/Frameworks/Foundation/JSColor+HTML.js +11 -2
  32. package/Root/Frameworks/Foundation/JSColor.js +62 -26
  33. package/Root/Frameworks/Foundation/JSColorSpace.js +209 -1
  34. package/Root/Frameworks/Foundation/JSSpec.js +1 -1
  35. package/Root/Frameworks/Foundation/JSSynchronizer.js +9 -1
  36. package/Root/Frameworks/Foundation/JSURL.js +42 -3
  37. package/Root/Frameworks/ImageKit/Info.yaml +1 -1
  38. package/Root/Frameworks/MediaKit/Info.yaml +1 -1
  39. package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
  40. package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
  41. package/Root/Frameworks/PDFKit/Info.yaml +1 -1
  42. package/Root/Frameworks/QRKit/Info.yaml +1 -1
  43. package/Root/Frameworks/SearchKit/Info.yaml +1 -1
  44. package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
  45. package/Root/Frameworks/ServerKit/Info.yaml +1 -1
  46. package/Root/Frameworks/ServerKit/SKValidatingObject.js +21 -0
  47. package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
  48. package/Root/Frameworks/TestKit/Info.yaml +1 -1
  49. package/Root/Frameworks/UIKit/Info.yaml +1 -1
  50. package/Root/Frameworks/UIKit/JSColor+UIKit.js +75 -0
  51. package/Root/Frameworks/UIKit/UIAccessibility.js +15 -0
  52. package/Root/Frameworks/UIKit/UIActivityIndicatorView.js +2 -1
  53. package/Root/Frameworks/UIKit/UIAlertController.js +4 -3
  54. package/Root/Frameworks/UIKit/UIAnimation.js +7 -13
  55. package/Root/Frameworks/UIKit/UIApplication.js +3 -0
  56. package/Root/Frameworks/UIKit/UIBasicAnimation.js +6 -0
  57. package/Root/Frameworks/UIKit/UIButton.js +48 -25
  58. package/Root/Frameworks/UIKit/UICheckbox.js +11 -22
  59. package/Root/Frameworks/UIKit/UIColorPanel.js +27 -15
  60. package/Root/Frameworks/UIKit/UIColorSpace.js +132 -0
  61. package/Root/Frameworks/UIKit/UIColorWell.js +18 -2
  62. package/Root/Frameworks/UIKit/UIControl.js +15 -4
  63. package/Root/Frameworks/UIKit/UIHTMLDisplayServer.js +1 -5
  64. package/Root/Frameworks/UIKit/UIHTMLTextField.js +3 -15
  65. package/Root/Frameworks/UIKit/UIHTMLWindowServer.js +72 -1
  66. package/Root/Frameworks/UIKit/UIImageView.js +4 -0
  67. package/Root/Frameworks/UIKit/UIKit.js +2 -0
  68. package/Root/Frameworks/UIKit/UILabel.js +14 -2
  69. package/Root/Frameworks/UIKit/UILayer.js +29 -1
  70. package/Root/Frameworks/UIKit/UIListView.js +23 -12
  71. package/Root/Frameworks/UIKit/UIListViewCell.js +10 -2
  72. package/Root/Frameworks/UIKit/UIMenu.js +21 -13
  73. package/Root/Frameworks/UIKit/UIMenuBar.js +5 -4
  74. package/Root/Frameworks/UIKit/UIMenuView.js +9 -5
  75. package/Root/Frameworks/UIKit/UINavigationBar.js +8 -5
  76. package/Root/Frameworks/UIKit/UINavigationController.js +3 -2
  77. package/Root/Frameworks/UIKit/UIOutlineViewCell.js +2 -1
  78. package/Root/Frameworks/UIKit/UIPopupButton.js +13 -24
  79. package/Root/Frameworks/UIKit/UIPopupWindow.js +3 -2
  80. package/Root/Frameworks/UIKit/UIProgressIndicatorView.js +1 -1
  81. package/Root/Frameworks/UIKit/UIRadioGroup.js +11 -22
  82. package/Root/Frameworks/UIKit/UIScroller.js +4 -3
  83. package/Root/Frameworks/UIKit/UISegmentedControl.js +16 -15
  84. package/Root/Frameworks/UIKit/UISlider.js +20 -36
  85. package/Root/Frameworks/UIKit/UISplitView.js +40 -0
  86. package/Root/Frameworks/UIKit/UISplitViewController.js +7 -7
  87. package/Root/Frameworks/UIKit/UISplitViewDivider.js +9 -0
  88. package/Root/Frameworks/UIKit/UITabView.js +34 -31
  89. package/Root/Frameworks/UIKit/UITextEditor.js +2 -1
  90. package/Root/Frameworks/UIKit/UITextField.js +34 -23
  91. package/Root/Frameworks/UIKit/UITextLayer.js +5 -0
  92. package/Root/Frameworks/UIKit/UITokenField.js +3 -3
  93. package/Root/Frameworks/UIKit/UIToolbar.js +84 -38
  94. package/Root/Frameworks/UIKit/UIToolbarOverflow.svg +8 -0
  95. package/Root/Frameworks/UIKit/UITooltipWindow.js +38 -15
  96. package/Root/Frameworks/UIKit/UITraitCollection.js +21 -0
  97. package/Root/Frameworks/UIKit/UIUserInterface.js +6 -0
  98. package/Root/Frameworks/UIKit/UIWebView.js +3 -2
  99. package/Root/Frameworks/UIKit/UIWindow.js +139 -21
  100. package/Root/Frameworks/UIKit/UIWindowButtonCloseInactive.svg +1 -1
  101. package/Root/Frameworks/UIKit/UIWindowButtonCloseNormal.svg +1 -1
  102. package/Root/Frameworks/UIKit/UIWindowServer.js +72 -9
  103. package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
  104. package/Root/Templates/html/${PROJECT_NAME}/www/index.html +24 -4
  105. package/package.json +1 -1
@@ -17,6 +17,7 @@
17
17
  // #import "UILabel.js"
18
18
  // #import "UIImageView.js"
19
19
  // #import "UIMenu.js"
20
+ // #import "JSColor+UIKit.js"
20
21
  'use strict';
21
22
 
22
23
  (function(){
@@ -480,7 +481,7 @@ JSClass("UIPopupButtonCustomStyler", UIPopupButtonStyler, {
480
481
  indicatorSpacing: 0,
481
482
 
482
483
  init: function(){
483
- this.initWithColor(JSColor.black);
484
+ this.initWithColor(JSColor.text);
484
485
  },
485
486
 
486
487
  initWithColor: function(color){
@@ -588,7 +589,7 @@ JSClass("UIPopupButtonCustomStyler", UIPopupButtonStyler, {
588
589
  }
589
590
  }
590
591
  if (this.normalTitleColor === null){
591
- this.normalTitleColor = JSColor.black;
592
+ this.normalTitleColor = JSColor.text;
592
593
  }
593
594
  if (this.activeTitleColor === null){
594
595
  this.activeTitleColor = this.normalTitleColor.colorDarkenedByPercentage(0.2);
@@ -703,31 +704,31 @@ JSClass("UIPopupButtonDefaultStyler", UIPopupButtonCustomStyler, {
703
704
 
704
705
  _fillInMissingColors: function(){
705
706
  if (this.normalBackgroundColor === null){
706
- this.normalBackgroundColor = UIPopupButtonDefaultStyler.NormalBackgroundColor;
707
+ this.normalBackgroundColor = JSColor.controlBackground;
707
708
  if (this.activeBackgroundColor === null){
708
- this.activeBackgroundColor = UIPopupButtonDefaultStyler.ActiveBackgroundColor;
709
+ this.activeBackgroundColor = JSColor.activeControlBackground;
709
710
  }
710
711
  if (this.disabledBackgroundColor === null){
711
- this.disabledBackgroundColor = UIPopupButtonDefaultStyler.DisabledBackgroundColor;
712
+ this.disabledBackgroundColor = JSColor.disabledControlBackground;
712
713
  }
713
714
  }
714
715
  if (this.normalBorderColor === null){
715
- this.normalBorderColor = UIPopupButtonDefaultStyler.NormalBorderColor;
716
+ this.normalBorderColor = JSColor.controlBorder;
716
717
  if (this.activeBorderColor === null){
717
- this.activeBorderColor = UIPopupButtonDefaultStyler.ActiveBorderColor;
718
+ this.activeBorderColor = JSColor.activeControlBorder;
718
719
  }
719
720
  if (this.disabledBorderColor === null){
720
- this.disabledBorderColor = UIPopupButtonDefaultStyler.DisabledBorderColor;
721
+ this.disabledBorderColor = JSColor.disabledControlBorder;
721
722
  }
722
723
  }
723
724
  if (this.normalTitleColor === null){
724
- this.normalTitleColor = UIPopupButtonDefaultStyler.NormalTitleColor;
725
+ this.normalTitleColor = JSColor.controlTitle;
725
726
  }
726
727
  if (this.activeTitleColor === null){
727
- this.activeTitleColor = UIPopupButtonDefaultStyler.ActiveTitleColor;
728
+ this.activeTitleColor = JSColor.activeControlTitle;
728
729
  }
729
730
  if (this.disabledTitleColor === null){
730
- this.disabledTitleColor = UIPopupButtonDefaultStyler.DisabledTitleColor;
731
+ this.disabledTitleColor = JSColor.disabledControlTitle;
731
732
  }
732
733
  }
733
734
 
@@ -744,7 +745,7 @@ JSClass("UIPopupButtonImageStyler", UIPopupButtonStyler, {
744
745
  cornerRadius: 0,
745
746
 
746
747
  init: function(){
747
- this.initWithColor(JSColor.black);
748
+ this.initWithColor(JSColor.text);
748
749
  },
749
750
 
750
751
  initWithColor: function(color){
@@ -832,18 +833,6 @@ JSClass("UIPopupButtonImageStyler", UIPopupButtonStyler, {
832
833
 
833
834
  });
834
835
 
835
- UIPopupButtonDefaultStyler.NormalBackgroundColor = JSColor.initWithRGBA(250/255,250/255,250/255);
836
- UIPopupButtonDefaultStyler.ActiveBackgroundColor = JSColor.initWithRGBA(224/255,224/255,224/255);
837
- UIPopupButtonDefaultStyler.DisabledBackgroundColor = JSColor.initWithRGBA(240/255,240/255,240/255);
838
-
839
- UIPopupButtonDefaultStyler.NormalBorderColor = JSColor.initWithRGBA(204/255,204/255,204/255);
840
- UIPopupButtonDefaultStyler.ActiveBorderColor = JSColor.initWithRGBA(192/255,192/255,192/255);
841
- UIPopupButtonDefaultStyler.DisabledBorderColor = JSColor.initWithRGBA(224/255,224/255,224/255);
842
-
843
- UIPopupButtonDefaultStyler.NormalTitleColor = JSColor.initWithRGBA(51/255,51/255,51/255);
844
- UIPopupButtonDefaultStyler.ActiveTitleColor = JSColor.initWithRGBA(51/255,51/255,51/255);
845
- UIPopupButtonDefaultStyler.DisabledTitleColor = JSColor.initWithRGBA(152/255,152/255,152/255);
846
-
847
836
  var images = Object.create({}, {
848
837
 
849
838
  bundle: {
@@ -15,6 +15,7 @@
15
15
 
16
16
  // #import "UIWindow.js"
17
17
  // #import "UIViewPropertyAnimator.js"
18
+ // #import "JSColor+UIKit.js"
18
19
  'use strict';
19
20
 
20
21
  JSClass("UIPopupWindow", UIWindow, {
@@ -321,8 +322,8 @@ JSClass("UIPopupWindowStyler", UIWindowStyler, {
321
322
 
322
323
  init: function(){
323
324
  UIPopupWindowStyler.$super.init.call(this);
324
- this.backgroundColor = JSColor.initWithRGBA(240/255,240/255,240/255,1);
325
- this.shadowColor = JSColor.initWithRGBA(0, 0, 0, 0.4);
325
+ this.backgroundColor = JSColor.window;
326
+ this.shadowColor = JSColor.windowShadow;
326
327
  this.shadowOffset = JSPoint.Zero;
327
328
  this.shadowRadius = UIWindow.Styler.default.shadowRadius;
328
329
  this.cornerRadius = UIWindow.Styler.default.cornerRadius;
@@ -51,7 +51,7 @@ JSClass("UIProgressIndicatorView", UIView, {
51
51
 
52
52
  _commonProgressInit: function(){
53
53
  if (this._progressBarColor === null){
54
- this._progressBarColor = JSColor.initWithRGBA(0, 0, 0, 0.4);
54
+ this._progressBarColor = JSColor.initWithUIStyles(JSColor.black.colorLightenedByPercentage(0.6), JSColor.white.colorDarkenedByPercentage(0.6));
55
55
  }
56
56
  if (this._progressBorderColor === null){
57
57
  this._progressBorderColor = this._progressBarColor;
@@ -17,6 +17,7 @@
17
17
  // #import "UILabel.js"
18
18
  // #import "UIImageView.js"
19
19
  // #import "UIEvent.js"
20
+ // #import "JSColor+UIKit.js"
20
21
  'use strict';
21
22
 
22
23
  (function(){
@@ -360,16 +361,16 @@ JSClass("UIRadioButtonDefaultStyler", UIRadioButtonStyler, {
360
361
  borderWidth: 1,
361
362
 
362
363
  init: function(){
363
- this.normalBackgroundColor = UIRadioButtonDefaultStyler.NormalBackgroundColor;
364
- this.disabledBackgroundColor = UIRadioButtonDefaultStyler.DisabledBackgroundColor;
365
- this.activeBackgroundColor = UIRadioButtonDefaultStyler.ActiveBackgroundColor;
366
- this.normalBorderColor = UIRadioButtonDefaultStyler.NormalBorderColor;
367
- this.disabledBorderColor = UIRadioButtonDefaultStyler.DisabledBorderColor;
368
- this.activeBorderColor = UIRadioButtonDefaultStyler.ActiveBorderColor;
369
- this.normalTitleColor = UIRadioButtonDefaultStyler.NormalTitleColor;
370
- this.disabledTitleColor = UIRadioButtonDefaultStyler.DisabledTitleColor;
371
- this.activeTitleColor = UIRadioButtonDefaultStyler.ActiveTitleColor;
372
- this.shadowColor = JSColor.initWithRGBA(0, 0, 0, 0.1);
364
+ this.normalBackgroundColor = JSColor.controlBackground;
365
+ this.disabledBackgroundColor = JSColor.disabledControlBackground;
366
+ this.activeBackgroundColor = JSColor.activeControlBackground;
367
+ this.normalBorderColor = JSColor.controlBorder;
368
+ this.disabledBorderColor = JSColor.disabledControlBorder;
369
+ this.activeBorderColor = JSColor.activeControlBorder;
370
+ this.normalTitleColor = JSColor.controlTitle;
371
+ this.disabledTitleColor = JSColor.disabledControlTitle;
372
+ this.activeTitleColor = JSColor.activeControlTitle;
373
+ this.shadowColor = JSColor.controlShadow;
373
374
  this.shadowOffset = JSPoint(0, 1);
374
375
  },
375
376
 
@@ -426,18 +427,6 @@ JSClass("UIRadioButtonDefaultStyler", UIRadioButtonStyler, {
426
427
 
427
428
  });
428
429
 
429
- UIRadioButtonDefaultStyler.NormalBackgroundColor = JSColor.initWithRGBA(250/255,250/255,250/255);
430
- UIRadioButtonDefaultStyler.ActiveBackgroundColor = JSColor.initWithRGBA(224/255,224/255,224/255);
431
- UIRadioButtonDefaultStyler.DisabledBackgroundColor = JSColor.initWithRGBA(240/255,240/255,240/255);
432
-
433
- UIRadioButtonDefaultStyler.NormalBorderColor = JSColor.initWithRGBA(204/255,204/255,204/255);
434
- UIRadioButtonDefaultStyler.ActiveBorderColor = JSColor.initWithRGBA(192/255,192/255,192/255);
435
- UIRadioButtonDefaultStyler.DisabledBorderColor = JSColor.initWithRGBA(224/255,224/255,224/255);
436
-
437
- UIRadioButtonDefaultStyler.NormalTitleColor = JSColor.initWithRGBA(51/255,51/255,51/255);
438
- UIRadioButtonDefaultStyler.ActiveTitleColor = JSColor.initWithRGBA(51/255,51/255,51/255);
439
- UIRadioButtonDefaultStyler.DisabledTitleColor = JSColor.initWithRGBA(152/255,152/255,152/255);
440
-
441
430
  var images = Object.create({}, {
442
431
 
443
432
  bundle: {
@@ -16,6 +16,7 @@
16
16
  // #import "UIControl.js"
17
17
  // #import "UIViewPropertyAnimator.js"
18
18
  // #import "UIDevice.js"
19
+ // #import "JSColor+UIKit.js"
19
20
  'use strict';
20
21
 
21
22
  JSClass("UIScroller", UIControl, {
@@ -287,9 +288,9 @@ JSClass("UIScrollerDefaultStyler", UIScrollerStyler, {
287
288
  this.knobInsets = JSInsets(2, 3, 2, 2);
288
289
  var maxKnobWidth = this.expandedSize - this.knobInsets.left - this.knobInsets.right;
289
290
  this.minimumKnobLength = maxKnobWidth * 2;
290
- this.trackColor = JSColor.initWithWhite(0, 0.1);
291
- this.trackBorderColor = JSColor.initWithWhite(0, 0.15);
292
- this.knobColor = JSColor.initWithWhite(0, 0.6);
291
+ this.trackColor = JSColor.initWithUIStyles(JSColor.initWithWhite(0, 0.1), JSColor.initWithWhite(1, 0.1));
292
+ this.trackBorderColor = JSColor.initWithUIStyles(JSColor.initWithWhite(0, 0.15), JSColor.initWithWhite(1, 0.05));
293
+ this.knobColor = JSColor.initWithUIStyles(JSColor.initWithWhite(0, 0.6), JSColor.initWithWhite(1, 0.6));
293
294
  if (UIDevice.shared && UIDevice.shared.primaryPointerType === UIUserInterface.PointerType.touch){
294
295
  this.collapsedSize = 8;
295
296
  }
@@ -17,6 +17,7 @@
17
17
  // #import "UILabel.js"
18
18
  // #import "UIImageView.js"
19
19
  // #import "UIEvent.js"
20
+ // #import "JSColor+UIKit.js"
20
21
  'use strict';
21
22
 
22
23
  JSClass("UISegmentedControl", UIControl, {
@@ -662,21 +663,21 @@ JSClass("UISegmentedControlDefaultStyler", UISegmentedControlStyler, {
662
663
  cornerRadius: 3,
663
664
 
664
665
  init: function(){
665
- this.normalBackgroundColor = JSColor.initWithRGBA(250/255,250/255,250/255);
666
- this.activeBackgroundColor = JSColor.initWithRGBA(224/255,224/255,224/255);
667
- this.disabledBackgroundColor = JSColor.initWithRGBA(240/255,240/255,240/255);
668
- this.selectedBackgroundColor = JSColor.initWithRGBA(128/255,128/255,128/255);
669
- this.selectedActiveBackgroundColor = JSColor.initWithRGBA(102/255,102/255,102/255);
670
- this.normalBorderColor = JSColor.initWithRGBA(204/255,204/255,204/255);
671
- this.activeBorderColor = JSColor.initWithRGBA(192/255,192/255,192/255);
672
- this.disabledBorderColor = JSColor.initWithRGBA(224/255,224/255,224/255);
673
- this.selectedBorderColor = this.selectedBackgroundColor;
674
- this.selectedActiveBorderColor = this.selectedActiveBackgroundColor;
675
- this.normalTitleColor = JSColor.initWithRGBA(51/255,51/255,51/255);
676
- this.activeTitleColor = JSColor.initWithRGBA(51/255,51/255,51/255);
677
- this.disabledTitleColor = JSColor.initWithRGBA(152/255,152/255,152/255);
678
- this.selectedTitleColor = JSColor.initWithRGBA(240/255,240/255,240/255);
679
- this.selectedActiveTitleColor = this.selectedTitleColor;
666
+ this.normalBackgroundColor = JSColor.controlBackground;
667
+ this.activeBackgroundColor = JSColor.activeControlBackground;
668
+ this.disabledBackgroundColor = JSColor.disabledControlBackground;
669
+ this.selectedBackgroundColor = JSColor.selectedControlBackground;
670
+ this.selectedActiveBackgroundColor = JSColor.activeSelectedControlBackground;
671
+ this.normalBorderColor = JSColor.controlBorder;
672
+ this.activeBorderColor = JSColor.activeControlBorder;
673
+ this.disabledBorderColor = JSColor.disabledControlBorder;
674
+ this.selectedBorderColor = JSColor.selectedControlBorder;
675
+ this.selectedActiveBorderColor = JSColor.activeSelectedControlBorder;
676
+ this.normalTitleColor = JSColor.controlTitle;
677
+ this.activeTitleColor = JSColor.activeControlTitle;
678
+ this.disabledTitleColor = JSColor.disabledControlTitle;
679
+ this.selectedTitleColor = JSColor.selectedControlTitle;
680
+ this.selectedActiveTitleColor = JSColor.activeSelectedControlTitle;
680
681
  this.shadowColor = JSColor.initWithRGBA(0, 0, 0, 0.1);
681
682
  this.shadowOffset = JSPoint(0, 1);
682
683
  this.titleInsets = JSInsets(3, 7);
@@ -330,21 +330,21 @@ JSClass("UISliderDefaultStyler", UISliderLayerBasedStyler, {
330
330
  init: function(){
331
331
  UISliderDefaultStyler.$super.init.call(this);
332
332
  this.knobSize = JSSize(16, 16);
333
- this.normalTrackColor = UISliderDefaultStyler.NormalTrackColor;
334
- this.activeTrackColor = UISliderDefaultStyler.ActiveTrackColor;
335
- this.disabledTrackColor = UISliderDefaultStyler.DisabledTrackColor;
336
- this.normalTrackBorderColor = UISliderDefaultStyler.NormalTrackBorderColor;
337
- this.activeTrackBorderColor = UISliderDefaultStyler.ActiveTrackBorderColor;
338
- this.disabledTrackBorderColor = UISliderDefaultStyler.DisabledTrackBorderColor;
333
+ this.normalTrackColor = JSColor.initWithUIStyles(JSColor.controlBackground.colorDarkenedByPercentage(0.02), JSColor.controlBackground.colorDarkenedByPercentage(0.3), JSColor.controlBackground, JSColor.controlBackground);
334
+ this.activeTrackColor = this.normalTrackColor;
335
+ this.disabledTrackColor = JSColor.disabledControlBackground;
336
+ this.normalTrackBorderColor = JSColor.controlBorder;
337
+ this.activeTrackBorderColor = JSColor.controlBorder;
338
+ this.disabledTrackBorderColor = JSColor.disabledControlBorder;
339
339
  this.trackInnerShadowColor = JSColor.black.colorWithAlpha(0.4);
340
340
  this.trackInnerShadowOffset = JSPoint(0, 1);
341
- this.normalKnobBackgroundColor = UISliderDefaultStyler.NormalKnobBackgroundColor;
342
- this.disabledKnobBackgroundColor = UISliderDefaultStyler.DisabledKnobBackgroundColor;
343
- this.activeKnobBackgroundColor = UISliderDefaultStyler.ActiveKnobBackgroundColor;
344
- this.normalKnobBorderColor = UISliderDefaultStyler.NormalKnobBorderColor;
345
- this.disabledKnobBorderColor = UISliderDefaultStyler.DisabledKnobBorderColor;
346
- this.activeKnobBorderColor = UISliderDefaultStyler.ActiveKnobBorderColor;
347
- this.knobShadowColor = JSColor.black.colorWithAlpha(0.1);
341
+ this.normalKnobBackgroundColor = JSColor.controlBackground;
342
+ this.disabledKnobBackgroundColor = JSColor.disabledControlBackground;
343
+ this.activeKnobBackgroundColor = JSColor.activeControlBackground;
344
+ this.normalKnobBorderColor = JSColor.controlBorder;
345
+ this.disabledKnobBorderColor = JSColor.disabledControlBorder;
346
+ this.activeKnobBorderColor = JSColor.activeControlBorder;
347
+ this.knobShadowColor = JSColor.controlShadow;
348
348
  this.knobShadowOffset = JSPoint(0, 1);
349
349
  },
350
350
 
@@ -534,22 +534,6 @@ JSClass("UISliderDefaultStyler", UISliderLayerBasedStyler, {
534
534
 
535
535
  });
536
536
 
537
- UISliderDefaultStyler.NormalTrackColor = JSColor.initWithRGBA(245/255,245/255,245/255);
538
- UISliderDefaultStyler.ActiveTrackColor = UISliderDefaultStyler.NormalTrackColor;
539
- UISliderDefaultStyler.DisabledTrackColor = JSColor.initWithRGBA(240/255,240/255,240/255);
540
-
541
- UISliderDefaultStyler.NormalTrackBorderColor = JSColor.initWithRGBA(204/255,204/255,204/255);
542
- UISliderDefaultStyler.ActiveTrackBorderColor = UISliderDefaultStyler.NormalTrackBorderColor;
543
- UISliderDefaultStyler.DisabledTrackBorderColor = JSColor.initWithRGBA(224/255,224/255,224/255);
544
-
545
- UISliderDefaultStyler.NormalKnobBackgroundColor = JSColor.initWithRGBA(250/255,250/255,250/255);
546
- UISliderDefaultStyler.ActiveKnobBackgroundColor = JSColor.initWithRGBA(224/255,224/255,224/255);
547
- UISliderDefaultStyler.DisabledKnobBackgroundColor = JSColor.initWithRGBA(240/255,240/255,240/255);
548
-
549
- UISliderDefaultStyler.NormalKnobBorderColor = JSColor.initWithRGBA(204/255,204/255,204/255);
550
- UISliderDefaultStyler.ActiveKnobBorderColor = JSColor.initWithRGBA(192/255,192/255,192/255);
551
- UISliderDefaultStyler.DisabledKnobBorderColor = JSColor.initWithRGBA(224/255,224/255,224/255);
552
-
553
537
  JSClass("UISliderColorStyler", UISliderLayerBasedStyler, {
554
538
 
555
539
  gradient: null,
@@ -595,13 +579,13 @@ JSClass("UISliderColorStyler", UISliderLayerBasedStyler, {
595
579
  this.knobSize = JSSize(this.trackWidth + 6, this.trackWidth + 6);
596
580
  }
597
581
  this.trackRadius = this.trackWidth / 2;
598
- this.normalKnobBackgroundColor = JSColor.white;
599
- this.activeKnobBackgroundColor = JSColor.white;
600
- this.disabledKnobBackgroundColor = this.normalKnobBackgroundColor.colorWithAlpha(0.5);
601
- this.normalKnobBorderColor = JSColor.black.colorWithAlpha(0.2);
602
- this.activeKnobBorderColor = JSColor.black.colorWithAlpha(0.3);
603
- this.disabledKnobBorderColor = JSColor.black.colorWithAlpha(0.1);
604
- this.checkerColor = JSColor.initWithWhite(0.9);
582
+ this.normalKnobBackgroundColor = JSColor.controlBackground;
583
+ this.activeKnobBackgroundColor = JSColor.activeControlBackground;
584
+ this.disabledKnobBackgroundColor = JSColor.disabledControlBackground;
585
+ this.normalKnobBorderColor = JSColor.controlBorder;
586
+ this.activeKnobBorderColor = JSColor.activeControlBorder;
587
+ this.disabledKnobBorderColor = JSColor.disabledControlBorder;
588
+ this.checkerColor = JSColor.initWithUIStyles(JSColor.initWithWhite(0.9), JSColor.initWithWhite(0.1));
605
589
  },
606
590
 
607
591
  setColors: function(colors){
@@ -50,6 +50,8 @@ JSClass("UISplitView", UIView, {
50
50
 
51
51
  leadingDividerColor: JSDynamicProperty(),
52
52
  trailingDividerColor: JSDynamicProperty(),
53
+ leadingDividerGradient: JSDynamicProperty(),
54
+ trailingDividerGradient: JSDynamicProperty(),
53
55
 
54
56
  delegate: null,
55
57
 
@@ -132,6 +134,12 @@ JSClass("UISplitView", UIView, {
132
134
  if (spec.containsKey('trailingDividerColor')){
133
135
  this.trailingDividerColor = spec.valueForKey("trailingDividerColor", JSColor);
134
136
  }
137
+ if (spec.containsKey('leadingDividerGradient')){
138
+ this.leadingDividerGradient = spec.valueForKey("leadingDividerGradient", JSGradient);
139
+ }
140
+ if (spec.containsKey('trailingDividerGradient')){
141
+ this.trailingDividerGradient = spec.valueForKey("trailingDividerGradient", JSGradient);
142
+ }
135
143
  if (spec.containsKey('autosaveName')){
136
144
  this.autosaveName = spec.valueForKey("autosaveName");
137
145
  }
@@ -227,6 +235,22 @@ JSClass("UISplitView", UIView, {
227
235
  return this._trailingDividerView.color;
228
236
  },
229
237
 
238
+ setLeadingDividerGradient: function(gradient){
239
+ this._leadingDividerView.gradient = gradient;
240
+ },
241
+
242
+ getLeadingDividerGradient: function(){
243
+ return this._leadingDividerView.gradient;
244
+ },
245
+
246
+ setTrailingDividerGradient: function(gradient){
247
+ this._trailingDividerView.gradient = gradient;
248
+ },
249
+
250
+ getTrailingDividerGradient: function(){
251
+ return this._trailingDividerView.gradient;
252
+ },
253
+
230
254
  setLeadingView: function(leadingView){
231
255
  if (leadingView === this._leadingView){
232
256
  return;
@@ -473,10 +497,18 @@ JSClass("UISplitView", UIView, {
473
497
  if (this._leadingCollapses && leadingSize < this._minimumLeadingSize / 2){
474
498
  if (this._leadingViewOpen){
475
499
  this.leadingViewOpen = false;
500
+ this.leadingSize = this._previousLeadingSize;
501
+ if (this.delegate && this.delegate.splitViewDidToggleView){
502
+ this.delegate.splitViewDidToggleView(this, this._leadingView);
503
+ }
476
504
  }
477
505
  }else{
478
506
  if (!this._leadingViewOpen){
479
507
  this.leadingViewOpen = true;
508
+ this.leadingSize = this._minimumLeadingSize;
509
+ if (this.delegate && this.delegate.splitViewDidToggleView){
510
+ this.delegate.splitViewDidToggleView(this, this._leadingView);
511
+ }
480
512
  }
481
513
  if (leadingSize >= this._minimumLeadingSize && leadingSize <= maximumLeadingSize){
482
514
  this._leadingSize = leadingSize;
@@ -495,10 +527,18 @@ JSClass("UISplitView", UIView, {
495
527
  if (this._trailingCollapses && trailingSize < this._minimumTrailingSize / 2){
496
528
  if (this._trailingViewOpen){
497
529
  this.trailingViewOpen = false;
530
+ this.trailingSize = this._previousTrailingSize;
531
+ if (this.delegate && this.delegate.splitViewDidToggleView){
532
+ this.delegate.splitViewDidToggleView(this, this._trailingView);
533
+ }
498
534
  }
499
535
  }else{
500
536
  if (!this._trailingViewOpen){
501
537
  this.trailingViewOpen = true;
538
+ this.trailingSize = this._minimumTrailingSize;
539
+ if (this.delegate && this.delegate.splitViewDidToggleView){
540
+ this.delegate.splitViewDidToggleView(this, this._trailingView);
541
+ }
502
542
  }
503
543
  if (trailingSize >= this._minimumTrailingSize && trailingSize <= maximumTrailingSize){
504
544
  this._trailingSize = trailingSize;
@@ -147,10 +147,10 @@ JSClass("UISplitViewController", UIViewController, {
147
147
  }
148
148
  if (callAppearanceMethods){
149
149
  if (disappearingViewController !== null){
150
- disappearingViewController.viewDidDisappear(false);
150
+ disappearingViewController.enqueueDidDisappear();
151
151
  }
152
152
  if (this._leadingViewController !== null){
153
- this._leadingViewController.viewDidAppear(false);
153
+ this._leadingViewController.enqueueDidAppear();
154
154
  }
155
155
  }
156
156
  },
@@ -181,10 +181,10 @@ JSClass("UISplitViewController", UIViewController, {
181
181
  }
182
182
  if (callAppearanceMethods){
183
183
  if (disappearingViewController !== null){
184
- disappearingViewController.viewDidDisappear(false);
184
+ disappearingViewController.enqueueDidDisappear();
185
185
  }
186
186
  if (this._trailingViewController !== null){
187
- this._trailingViewController.viewDidAppear(false);
187
+ this._trailingViewController.enqueueDidAppear();
188
188
  }
189
189
  }
190
190
  },
@@ -200,7 +200,7 @@ JSClass("UISplitViewController", UIViewController, {
200
200
  this._mainViewController.removeFromParentViewController();
201
201
  }
202
202
  this._mainViewController = mainViewController;
203
- if (this.view.mainHidden){
203
+ if (this.isViewLoaded && this.view.mainHidden){
204
204
  if (this._mainViewController){
205
205
  this._leadingViewController.show(this._mainViewController, this);
206
206
  }
@@ -220,10 +220,10 @@ JSClass("UISplitViewController", UIViewController, {
220
220
  }
221
221
  if (callAppearanceMethods){
222
222
  if (disappearingViewController !== null){
223
- disappearingViewController.viewDidDisappear(false);
223
+ disappearingViewController.enqueueDidDisappear();
224
224
  }
225
225
  if (this._mainViewController !== null){
226
- this._mainViewController.viewDidAppear(false);
226
+ this._mainViewController.enqueueDidAppear();
227
227
  }
228
228
  }
229
229
  }
@@ -25,6 +25,7 @@ JSClass("UISplitViewDivider", UIView, {
25
25
  layoutAdjustment: JSReadOnlyProperty(),
26
26
  vertical: JSDynamicProperty('_isVertical', false, 'isVertical'),
27
27
  color: JSDynamicProperty(),
28
+ gradient: JSDynamicProperty(),
28
29
 
29
30
  initWithSizes: function(layoutSize, hitSize, vertical){
30
31
  this.init();
@@ -43,6 +44,14 @@ JSClass("UISplitViewDivider", UIView, {
43
44
  return this.lineView.backgroundColor;
44
45
  },
45
46
 
47
+ setGradient: function(gradient){
48
+ this.lineView.backgroundGradient = gradient;
49
+ },
50
+
51
+ getGradient: function(){
52
+ return this.lineView.backgroundGradient;
53
+ },
54
+
46
55
  layoutSubviews: function(){
47
56
  UISplitViewDivider.$super.layoutSubviews.call(this);
48
57
  if (this._isVertical){
@@ -60,9 +60,10 @@ JSClass("UITabView", UIView, {
60
60
  this.delegate = spec.valueForKey("delegate");
61
61
  }
62
62
  if (spec.containsKey('items')){
63
- var items = spec.valueForKey('items');
64
- for (var i = 0, l = items.length; i < l; ++i){
65
- items.push(items.valueForKey(i, UITabViewItem));
63
+ var items = [];
64
+ var specItems = spec.valueForKey('items');
65
+ for (var i = 0, l = specItems.length; i < l; ++i){
66
+ items.push(specItems.valueForKey(i, UITabViewItem));
66
67
  }
67
68
  this.items = items;
68
69
  }
@@ -689,18 +690,18 @@ JSClass("UITabViewDefaultStyler", UITabViewStyler, {
689
690
 
690
691
  init: function(){
691
692
  UITabViewDefaultStyler.$super.init.call(this);
692
- this.normalItemColor = JSColor.initWithRGBA(250/255,250/255,250/255);
693
- this.activeItemColor = JSColor.initWithRGBA(224/255,224/255,224/255);
694
- this.selectedItemColor = JSColor.initWithRGBA(70/255,153/255,254/255);
695
- this.activeSelectedItemColor = JSColor.initWithRGBA(63/255,138/255,230/255);
696
- this.normalBorderColor = JSColor.initWithRGBA(204/255,204/255,204/255);
697
- this.activeBorderColor = JSColor.initWithRGBA(192/255,192/255,192/255);
698
- this.selectedBorderColor = JSColor.initWithRGBA(63/255,138/255,230/255);
699
- this.activeSelectedBorderColor = JSColor.initWithRGBA(54/255,123/255,205/255);
700
- this.normalTitleColor = JSColor.initWithRGBA(51/255,51/255,51/255);
701
- this.activeTitleColor = JSColor.initWithRGBA(51/255,51/255,51/255);
702
- this.selectedTitleColor = JSColor.initWithRGBA(255/255,255/255,255/255);
703
- this.selectedActiveTitleColor = JSColor.initWithRGBA(255/255,255/255,255/255);
693
+ this.normalItemColor = JSColor.controlBackground;
694
+ this.activeItemColor = JSColor.activeControlBackground;
695
+ this.selectedItemColor = JSColor.highlight;
696
+ this.activeSelectedItemColor = JSColor.highlight.colorDarkenedByPercentage(0.2);
697
+ this.normalBorderColor = JSColor.controlBorder;
698
+ this.activeBorderColor = JSColor.activeControlBorder;
699
+ this.selectedBorderColor = JSColor.highlight.colorDarkenedByPercentage(0.2);
700
+ this.activeSelectedBorderColor = JSColor.highlight.colorDarkenedByPercentage(0.4);
701
+ this.normalTitleColor = JSColor.controlTitle;
702
+ this.activeTitleColor = JSColor.activeControlTitle;
703
+ this.selectedTitleColor = JSColor.highlightedText;
704
+ this.selectedActiveTitleColor = JSColor.highlightedText;
704
705
  this._fillInMissingStyles();
705
706
  },
706
707
 
@@ -777,22 +778,22 @@ JSClass("UITabViewDefaultStyler", UITabViewStyler, {
777
778
  this.itemsInsets = JSInsets(4);
778
779
  }
779
780
  if (this.normalTitleColor === null){
780
- this.normalTitleColor = JSColor.black;
781
+ this.normalTitleColor = JSColor.controlTitle;
781
782
  }
782
783
  if (this.activeTitleColor === null){
783
784
  this.activeTitleColor = this.normalTitleColor;
784
785
  }
785
786
  if (this.selectedTitleColor === null){
786
- this.selectedTitleColor = JSColor.white;
787
+ this.selectedTitleColor = JSColor.highlightedText;
787
788
  }
788
789
  if (this.activeSelectedTitleColor === null){
789
790
  this.activeSelectedTitleColor = this.selectedTitleColor;
790
791
  }
791
792
  if (this.normalItemColor === null){
792
- this.normalItemColor = JSColor.initWithRGBA(250/255,250/255,250/255);
793
+ this.normalItemColor = JSColor.highlight;
793
794
  }
794
795
  if (this.selectedItemColor === null){
795
- this.selectedItemColor = JSColor.initWithRGBA(70/255,153/255,254/255);
796
+ this.selectedItemColor = JSColor.highlight.colorDarkenedByPercentage(0.2);
796
797
  }
797
798
  if (this.activeItemColor === null){
798
799
  this.activeItemColor = this.normalItemColor.colorDarkenedByPercentage(0.1);
@@ -813,7 +814,7 @@ JSClass("UITabViewDefaultStyler", UITabViewStyler, {
813
814
  this.activeSelectedBorderColor = this.selectedBorderColor.colorDarkenedByPercentage(0.05);
814
815
  }
815
816
  if (this.dividerColor === null){
816
- this.dividerColor = this.normalBorderColor;
817
+ this.dividerColor = JSColor.initWithUIStyles(JSColor.black.colorWithAlpha(0.2), JSColor.white.colorWithAlpha(0.2));
817
818
  }
818
819
  },
819
820
 
@@ -824,7 +825,7 @@ JSClass("UITabViewDefaultStyler", UITabViewStyler, {
824
825
  tabView.addSubview(props.contentViewContainer);
825
826
  props.itemsView = UITabViewItemsView.init();
826
827
  props.itemsView.tabView = tabView;
827
- props.itemsView.shadowColor = JSColor.initWithRGBA(0, 0, 0, 0.1);
828
+ props.itemsView.shadowColor = JSColor.controlShadow;
828
829
  props.itemsView.shadowOffset = JSPoint(0, 1);
829
830
  props.itemsView.shadowRadius = 1;
830
831
  props.itemsView.cornerRadius = this.cornerRadius;
@@ -1038,6 +1039,7 @@ UITabView.Styler = Object.defineProperties({}, {
1038
1039
  },
1039
1040
 
1040
1041
  tabless: {
1042
+ configurable: true,
1041
1043
  get: function UITabView_getTablessStyler(){
1042
1044
  var styler = UITabViewTablessStyler.init();
1043
1045
  Object.defineProperty(this, 'tabless', {writable: true, value: styler});
@@ -1046,6 +1048,7 @@ UITabView.Styler = Object.defineProperties({}, {
1046
1048
  },
1047
1049
 
1048
1050
  images: {
1051
+ configurable: true,
1049
1052
  get: function UITabView_getImagesStyler(){
1050
1053
  var styler = UITabViewImagesStyler.init();
1051
1054
  Object.defineProperty(this, 'images', {writable: true, value: styler});
@@ -1163,8 +1166,8 @@ JSClass("UITabViewImagesStyler", UITabViewStyler, {
1163
1166
  initializeTabView: function(tabView){
1164
1167
  UITabViewDefaultStyler.$super.initializeTabView.call(this, tabView);
1165
1168
  if (this.borderColor === null){
1166
- var backgroundColor = tabView.backgroundColor || JSColor.white;
1167
- this.borderColor = backgroundColor.colorDarkenedByPercentage(0.2);
1169
+ var backgroundColor = tabView.backgroundColor || JSColor.background;
1170
+ this.borderColor = JSColor.initWithUIStyles(JSColor.black.colorWithAlpha(0.2), JSColor.white.colorWithAlpha(0.2));
1168
1171
  }
1169
1172
  var props = tabView.stylerProperties;
1170
1173
  props.contentViewContainer = UITabViewContentContainer.init();
@@ -1234,14 +1237,14 @@ JSClass("UITabViewImagesStyler", UITabViewStyler, {
1234
1237
  });
1235
1238
 
1236
1239
  var defaultStateImageColors = [
1237
- JSColor.initWithRGBA(0,0,0,0.2), // 0 normal
1238
- JSColor.initWithRGBA(0,0,0,0.2), // 1 over
1239
- JSColor.initWithRGBA(0,0,0,0.5), // 2 active
1240
- JSColor.initWithRGBA(0,0,0,0.5), // 3 active + over
1241
- JSColor.initWithRGBA(70/255,153/255,254/255), // 4 selected
1242
- JSColor.initWithRGBA(70/255,153/255,254/255), // 5 selected + over
1243
- JSColor.initWithRGBA(54/255,123/255,205/255), // 6 selected + active
1244
- JSColor.initWithRGBA(54/255,123/255,205/255), // 7 selected + active + over
1240
+ JSColor.initWithUIStyles(JSColor.black.colorWithAlpha(0.2), JSColor.white.colorWithAlpha(0.2)), // 0 normal
1241
+ JSColor.initWithUIStyles(JSColor.black.colorWithAlpha(0.2), JSColor.white.colorWithAlpha(0.2)), // 1 over
1242
+ JSColor.initWithUIStyles(JSColor.black.colorWithAlpha(0.5), JSColor.white.colorWithAlpha(0.1)), // 2 active
1243
+ JSColor.initWithUIStyles(JSColor.black.colorWithAlpha(0.5), JSColor.white.colorWithAlpha(0.1)), // 3 active + over
1244
+ JSColor.highlight, // 4 selected
1245
+ JSColor.highlight, // 5 selected + over
1246
+ JSColor.highlight.colorDarkenedByPercentage(0.2), // 6 selected + active
1247
+ JSColor.highlight.colorDarkenedByPercentage(0.2), // 7 selected + active + over
1245
1248
  ];
1246
1249
 
1247
1250
  })();
@@ -16,6 +16,7 @@
16
16
  // #import Foundation
17
17
  // #import "UILayer.js"
18
18
  // #import "UITextInput.js"
19
+ // #import "JSColor+UIKit.js"
19
20
  'use strict';
20
21
 
21
22
  (function(){
@@ -49,7 +50,7 @@ JSClass("UITextEditor", JSObject, {
49
50
  this._selectionHighlightLayers = [];
50
51
  this.textLayoutManager = textLayer.textLayoutManager;
51
52
  this.textLayoutManager.editor = this;
52
- this.cursorColor = JSColor.black;
53
+ this.cursorColor = JSColor.highlight;
53
54
  this.selections = [
54
55
  this._createSelection(JSRange(0, 0), UITextInput.SelectionInsertionPoint.end)
55
56
  ];