@breakside/jskit 2021.44.0 → 2022.3.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 (86) 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/Deflate.js +2 -3
  7. package/Frameworks/Foundation.jsframework/JS/Error+JS.js +10 -0
  8. package/Frameworks/Foundation.jsframework/JS/JSColorSpace.js +106 -20
  9. package/Frameworks/Foundation.jsframework/JS/JSDateFormatter.js +2 -2
  10. package/Frameworks/Foundation.jsframework/JS/JSTimer.js +6 -0
  11. package/Frameworks/Foundation.jsframework/JS/JSURLResponse.js +60 -1
  12. package/Frameworks/Foundation.jsframework/JS/Zlib.js +2 -3
  13. package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
  14. package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
  15. package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
  16. package/Info.json +2 -2
  17. package/Node/JavascriptCompilation.js +1 -1
  18. package/Node/io.breakside.jskit-bundle.js +2 -2
  19. package/Root/Frameworks/APIKit/APIError.js +2 -3
  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/DBObjectDatabase.js +6 -5
  27. package/Root/Frameworks/DBKit/Info.yaml +1 -1
  28. package/Root/Frameworks/DOM/Info.yaml +1 -1
  29. package/Root/Frameworks/Dispatch/Info.yaml +1 -1
  30. package/Root/Frameworks/FontKit/Info.yaml +1 -1
  31. package/Root/Frameworks/Foundation/Deflate.js +2 -3
  32. package/Root/Frameworks/Foundation/Error+JS.js +10 -0
  33. package/Root/Frameworks/Foundation/Info.yaml +1 -1
  34. package/Root/Frameworks/Foundation/JSColorSpace.js +106 -20
  35. package/Root/Frameworks/Foundation/JSDateFormatter.js +2 -2
  36. package/Root/Frameworks/Foundation/JSTimer.js +6 -0
  37. package/Root/Frameworks/Foundation/JSURLResponse.js +60 -1
  38. package/Root/Frameworks/Foundation/Zlib.js +2 -3
  39. package/Root/Frameworks/ImageKit/IKColorProfile.js +979 -0
  40. package/Root/Frameworks/ImageKit/IKColorSpace.js +49 -198
  41. package/Root/Frameworks/ImageKit/IKDecoderPNG.js +1 -3
  42. package/Root/Frameworks/ImageKit/IKMatrix.js +124 -0
  43. package/Root/Frameworks/ImageKit/ImageKit.js +2 -0
  44. package/Root/Frameworks/ImageKit/Info.yaml +1 -1
  45. package/Root/Frameworks/MediaKit/Info.yaml +1 -1
  46. package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
  47. package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
  48. package/Root/Frameworks/PDFKit/Info.yaml +1 -1
  49. package/Root/Frameworks/QRKit/Info.yaml +1 -1
  50. package/Root/Frameworks/SearchKit/Info.yaml +1 -1
  51. package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
  52. package/Root/Frameworks/ServerKit/Info.yaml +1 -1
  53. package/Root/Frameworks/ServerKit/SKFileJobQueue.js +3 -1
  54. package/Root/Frameworks/ServerKit/SKHTTPError.js +2 -3
  55. package/Root/Frameworks/ServerKit/SKHTTPRequest.js +7 -0
  56. package/Root/Frameworks/ServerKit/SKHTTPResponder.js +9 -2
  57. package/Root/Frameworks/ServerKit/SKUserAgent.js +130 -0
  58. package/Root/Frameworks/ServerKit/SKValidatingObject.js +1 -3
  59. package/Root/Frameworks/ServerKit/ServerKit.js +1 -0
  60. package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
  61. package/Root/Frameworks/TestKit/Info.yaml +1 -1
  62. package/Root/Frameworks/UIKit/Info.yaml +1 -1
  63. package/Root/Frameworks/UIKit/UICollectionReusableView.js +91 -0
  64. package/Root/Frameworks/UIKit/UICollectionView.js +1254 -0
  65. package/Root/Frameworks/UIKit/UICollectionViewCell.js +121 -0
  66. package/Root/Frameworks/UIKit/UICollectionViewGridLayout.js +425 -0
  67. package/Root/Frameworks/UIKit/UICollectionViewLayout.js +82 -0
  68. package/Root/Frameworks/UIKit/UIColorWell.js +12 -1
  69. package/Root/Frameworks/UIKit/UIDisplayServer.js +5 -1
  70. package/Root/Frameworks/UIKit/UIKit.js +7 -0
  71. package/Root/Frameworks/UIKit/UILayer.js +3 -0
  72. package/Root/Frameworks/UIKit/UIListView.js +39 -15
  73. package/Root/Frameworks/UIKit/UIMenu.js +1 -1
  74. package/Root/Frameworks/UIKit/UIMenuView.js +5 -1
  75. package/Root/Frameworks/UIKit/UINavigationBar.js +2 -2
  76. package/Root/Frameworks/UIKit/UIPopupButton.js +31 -3
  77. package/Root/Frameworks/UIKit/UIScrollView.js +2 -0
  78. package/Root/Frameworks/UIKit/UISplitViewController.js +52 -96
  79. package/Root/Frameworks/UIKit/UITabView.js +2 -2
  80. package/Root/Frameworks/UIKit/UITabViewController.js +6 -5
  81. package/Root/Frameworks/UIKit/UITextField.js +3 -0
  82. package/Root/Frameworks/UIKit/UIView.js +18 -0
  83. package/Root/Frameworks/UIKit/UIViewController.js +11 -0
  84. package/Root/Frameworks/UIKit/UIWindowServer.js +2 -2
  85. package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
  86. package/package.json +1 -1
@@ -0,0 +1,130 @@
1
+ // Copyright 2021 Breakside Inc.
2
+ //
3
+ // Licensed under the Breakside Public License, Version 1.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // If a copy of the License was not distributed with this file, you may
6
+ // obtain a copy at
7
+ //
8
+ // http://breakside.io/licenses/LICENSE-1.0.txt
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+
16
+ // #import Foundation
17
+ "use strict";
18
+
19
+ JSClass("SKUserAgent", JSObject, {
20
+
21
+ string: null,
22
+ products: null,
23
+ productsByIdentifier: null,
24
+ comments: null,
25
+ commentSet: null,
26
+
27
+ initWithString: function(string){
28
+ if (string === null || string === undefined){
29
+ return null;
30
+ }
31
+ this.string = string;
32
+ this.products = [];
33
+ this.productsByIdentifier = new Set();
34
+ this.comments = [];
35
+ this.commentSet = new Set();
36
+ this.parse();
37
+ },
38
+
39
+ parse: function(){
40
+ var str = this.string;
41
+ var i = 0;
42
+ var l = this.string.length;
43
+ var product = "";
44
+ var version = "";
45
+ var comment = "";
46
+ while (i < l){
47
+ while (str[i] == " " || str[i] == "\t"){
48
+ ++i;
49
+ }
50
+ if (i < l){
51
+ if (str[i] == "("){
52
+ comment = "";
53
+ ++i;
54
+ while (i < l && str[i] !== ")"){
55
+ if (str[i] == ";"){
56
+ comment = comment.trim();
57
+ if (comment !== ""){
58
+ this.addComment(comment);
59
+ }
60
+ comment = "";
61
+ }else{
62
+ comment += str[i];
63
+ }
64
+ ++i;
65
+ }
66
+ comment = comment.trim();
67
+ if (comment !== ""){
68
+ this.addComment(comment);
69
+ }
70
+ if (i < l){
71
+ ++i;
72
+ }
73
+ }else{
74
+ product = "";
75
+ version = "";
76
+ while (i < l && str[i] !== "/" && str[i] !== " " && str[i] !== "\t"){
77
+ product += str[i];
78
+ ++i;
79
+ }
80
+ if (i < l && str[i] == "/"){
81
+ ++i;
82
+ while (i < l && str[i] !== "(" && str[i] !== " " && str[i] !== "\t"){
83
+ version += str[i];
84
+ ++i;
85
+ }
86
+ }
87
+ this.addProduct(product, version);
88
+ }
89
+ }
90
+ }
91
+ },
92
+
93
+ addProduct: function(name, version){
94
+ if (version === "" || version === undefined){
95
+ version = null;
96
+ }
97
+ var product = {name: name, version: version};
98
+ this.products.push(product);
99
+ this.productsByIdentifier[name] = product;
100
+ if (version !== null){
101
+ this.productsByIdentifier["%s/%s".sprintf(name, version)] = product;
102
+ }
103
+ },
104
+
105
+ addComment: function(comment){
106
+ this.comments.push(comment);
107
+ this.commentSet.add(comment);
108
+ },
109
+
110
+ containsProduct: function(name, version){
111
+ if (version === undefined || version === null || version === ""){
112
+ return name in this.productsByIdentifier;
113
+ }
114
+ return "%s/%s".sprintf(name, version) in this.productsByIdentifier;
115
+ },
116
+
117
+ versionOfProduct: function(name){
118
+ var product = this.productsByIdentifier[name];
119
+ if (product){
120
+ return product.version;
121
+ }
122
+ return null;
123
+ },
124
+
125
+ containsComment: function(comment){
126
+ return this.commentSet.has(comment);
127
+ }
128
+
129
+ });
130
+
@@ -527,9 +527,7 @@ SKValidatingObject.Error = function(info, message){
527
527
  this.message = message;
528
528
  break;
529
529
  }
530
- if (Error.captureStackTrace){
531
- Error.captureStackTrace(this, SKValidatingObject.Error);
532
- }
530
+ Error.captureStackTrace(this, SKValidatingObject.Error);
533
531
  }
534
532
  };
535
533
 
@@ -31,4 +31,5 @@
31
31
  // #import "SKSecretsEnvironmentProvider.js"
32
32
  // #import "SKHTTPRoute.js"
33
33
  // #import "SKHTTPRouteMatch.js"
34
+ // #import "SKUserAgent.js"
34
35
  'use strict';
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ServerKitTesting
3
- JSBundleVersion: 2021.44.0
3
+ JSBundleVersion: 2022.3.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.TestKit
3
- JSBundleVersion: 2021.44.0
3
+ JSBundleVersion: 2022.3.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.UIKit
3
- JSBundleVersion: 2021.44.0
3
+ JSBundleVersion: 2022.3.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -0,0 +1,91 @@
1
+ // Copyright 2022 Breakside Inc.
2
+ //
3
+ // Licensed under the Breakside Public License, Version 1.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // If a copy of the License was not distributed with this file, you may
6
+ // obtain a copy at
7
+ //
8
+ // http://breakside.io/licenses/LICENSE-1.0.txt
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+
16
+ // #import "UIView.js"
17
+ // #import "UILabel.js"
18
+ // #import "UIImageView.js"
19
+ 'use strict';
20
+
21
+ JSClass("UICollectionReusableView", UIView, {
22
+
23
+ collectionView: null,
24
+ indexPath: null,
25
+ reuseIdentifier: null,
26
+ contentView: JSReadOnlyProperty('_contentView', null),
27
+ stylerProperties: null,
28
+ _styler: null,
29
+
30
+ initWithReuseIdentifier: function(identifier, styler){
31
+ this.init();
32
+ this.reuseIdentifier = identifier;
33
+ this._styler = styler;
34
+ },
35
+
36
+ initWithFrame: function(frame){
37
+ UICollectionReusableView.$super.initWithFrame.call(this, frame);
38
+ this._commonReusableViewInit();
39
+ },
40
+
41
+ initWithSpec: function(spec){
42
+ UICollectionReusableView.$super.initWithSpec.call(this, spec);
43
+ this._commonReusableViewInit();
44
+ },
45
+
46
+ _commonReusableViewInit: function(){
47
+ this.stylerProperties = {};
48
+ this._contentView = UIView.init();
49
+ this.addSubview(this._contentView);
50
+ },
51
+
52
+ // --------------------------------------------------------------------
53
+ // MARK: - Applying Attributes
54
+
55
+ applyAttributes: function(attributes){
56
+ this.untransformedFrame = attributes.frame;
57
+ this.transform = attributes.transform;
58
+ },
59
+
60
+ // --------------------------------------------------------------------
61
+ // MARK: - Accessibility
62
+
63
+ getAccessibilityLabel: function(){
64
+ var label = UICollectionReusableView.$super.getAccessibilityLabel.call(this);
65
+ if (label !== null){
66
+ return label;
67
+ }
68
+ var stack = [this.contentView];
69
+ var view;
70
+ var i, l;
71
+ while (stack.length > 0){
72
+ view = stack.pop();
73
+ if (view.isKindOfClass(UILabel)){
74
+ return view.text;
75
+ }
76
+ for (i = 0, l = view.subviews.length; i < l; ++i){
77
+ stack.push(view.subviews[i]);
78
+ }
79
+ }
80
+ return null;
81
+ },
82
+
83
+ getAccessibilityElements: function(){
84
+ return this._contentView.accessibilityElements;
85
+ },
86
+
87
+ layoutSubviews: function(){
88
+ this.contentView.untransformedFrame = this.bounds;
89
+ }
90
+
91
+ });