@breakside/jskit 2023.9.1 → 2023.11.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 (64) 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/JSClass.js +0 -2
  7. package/Frameworks/Foundation.jsframework/JS/JSFont.js +8 -0
  8. package/Frameworks/Foundation.jsframework/JS/JSFontDescriptor.js +5 -0
  9. package/Frameworks/Foundation.jsframework/JS/JSTextFramesetter.js +7 -2
  10. package/Frameworks/Foundation.jsframework/JS/JSTextLine.js +2 -2
  11. package/Frameworks/Foundation.jsframework/JS/JSTextTypesetter.js +1 -1
  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/io.breakside.jskit-bundle.js +2 -2
  17. package/Root/Frameworks/APIKit/Info.yaml +1 -1
  18. package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
  19. package/Root/Frameworks/AuthKit/Info.yaml +1 -1
  20. package/Root/Frameworks/CSSOM/Info.yaml +1 -1
  21. package/Root/Frameworks/ChartKit/CHPieChart.js +1 -1
  22. package/Root/Frameworks/ChartKit/Info.yaml +1 -1
  23. package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
  24. package/Root/Frameworks/DBKit/Info.yaml +1 -1
  25. package/Root/Frameworks/DOM/Info.yaml +1 -1
  26. package/Root/Frameworks/Dispatch/Info.yaml +1 -1
  27. package/Root/Frameworks/FontKit/Info.yaml +1 -1
  28. package/Root/Frameworks/Foundation/Info.yaml +1 -1
  29. package/Root/Frameworks/Foundation/JSClass.js +0 -2
  30. package/Root/Frameworks/Foundation/JSFont.js +8 -0
  31. package/Root/Frameworks/Foundation/JSFontDescriptor.js +5 -0
  32. package/Root/Frameworks/Foundation/JSTextFramesetter.js +7 -2
  33. package/Root/Frameworks/Foundation/JSTextLine.js +2 -2
  34. package/Root/Frameworks/Foundation/JSTextTypesetter.js +1 -1
  35. package/Root/Frameworks/ImageKit/Info.yaml +1 -1
  36. package/Root/Frameworks/MediaKit/Info.yaml +1 -1
  37. package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
  38. package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
  39. package/Root/Frameworks/PDFKit/Info.yaml +1 -1
  40. package/Root/Frameworks/QRKit/Info.yaml +1 -1
  41. package/Root/Frameworks/SearchKit/Info.yaml +1 -1
  42. package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
  43. package/Root/Frameworks/ServerKit/Info.yaml +1 -1
  44. package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
  45. package/Root/Frameworks/TestKit/Info.yaml +1 -1
  46. package/Root/Frameworks/TestKit/TKTestSuite.js +1 -1
  47. package/Root/Frameworks/UIKit/Info.yaml +1 -1
  48. package/Root/Frameworks/UIKit/UIAlertController.js +2 -2
  49. package/Root/Frameworks/UIKit/UICollectionReusableView.js +1 -0
  50. package/Root/Frameworks/UIKit/UICollectionViewGridLayout.js +2 -11
  51. package/Root/Frameworks/UIKit/UICollectionViewLayout.js +1 -0
  52. package/Root/Frameworks/UIKit/UIHTMLDisplayServerCanvasContext.js +6 -1
  53. package/Root/Frameworks/UIKit/UIHTMLTextLine.js +6 -5
  54. package/Root/Frameworks/UIKit/UILayer.js +66 -4
  55. package/Root/Frameworks/UIKit/UIListView.js +4 -1
  56. package/Root/Frameworks/UIKit/UIMenuBar.js +1 -1
  57. package/Root/Frameworks/UIKit/UIScreen.js +5 -1
  58. package/Root/Frameworks/UIKit/UIView.js +26 -4
  59. package/Root/Frameworks/UIKit/UIVisualEffect+HTML.js +8 -0
  60. package/Root/Frameworks/UIKit/UIVisualEffect.js +25 -0
  61. package/Root/Frameworks/UIKit/UIWindow.js +10 -0
  62. package/Root/Frameworks/UIKit/UIWindowServer.js +2 -0
  63. package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
  64. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "JSBundleType": "framework",
3
3
  "JSBundleIdentifier": "io.breakside.JSKit.DOM",
4
- "JSBundleVersion": "2023.9.1",
4
+ "JSBundleVersion": "2023.11.0",
5
5
  "JSDevelopmentLanguage": "en",
6
6
  "JSCopyright": "Copyright © 2020 Breakside Inc.",
7
7
  "JSBundleEnvironments": {
@@ -9,5 +9,5 @@
9
9
  "node": "DOM+Node.js"
10
10
  },
11
11
  "JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
12
- "GitRevision": "1a4e4cfebe3671d6605583e7b24ff9665646b58f"
12
+ "GitRevision": "a030c131edd729dec656c535d8040085d2111960"
13
13
  }
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
3
3
  "Info": {
4
4
  "JSBundleType": "framework",
5
5
  "JSBundleIdentifier": "io.breakside.JSKit.DOM",
6
- "JSBundleVersion": "2023.9.1",
6
+ "JSBundleVersion": "2023.11.0",
7
7
  "JSDevelopmentLanguage": "en",
8
8
  "JSCopyright": "Copyright © 2020 Breakside Inc.",
9
9
  "JSBundleEnvironments": {
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
11
11
  "node": "DOM+Node.js"
12
12
  },
13
13
  "JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
14
- "GitRevision": "1a4e4cfebe3671d6605583e7b24ff9665646b58f"
14
+ "GitRevision": "a030c131edd729dec656c535d8040085d2111960"
15
15
  },
16
16
  "Resources": [],
17
17
  "ResourceLookup": {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "JSBundleType": "framework",
3
3
  "JSBundleIdentifier": "io.breakside.JSKit.FontKit",
4
- "JSBundleVersion": "2023.9.1",
4
+ "JSBundleVersion": "2023.11.0",
5
5
  "JSDevelopmentLanguage": "en",
6
6
  "JSCopyright": "Copyright © 2020 Breakside Inc.",
7
7
  "JSBundleEnvironments": {
8
8
  "html": "FontKit+HTML.js"
9
9
  },
10
10
  "JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
11
- "GitRevision": "1a4e4cfebe3671d6605583e7b24ff9665646b58f"
11
+ "GitRevision": "a030c131edd729dec656c535d8040085d2111960"
12
12
  }
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.JSKit.FontKit'] = {
3
3
  "Info": {
4
4
  "JSBundleType": "framework",
5
5
  "JSBundleIdentifier": "io.breakside.JSKit.FontKit",
6
- "JSBundleVersion": "2023.9.1",
6
+ "JSBundleVersion": "2023.11.0",
7
7
  "JSDevelopmentLanguage": "en",
8
8
  "JSCopyright": "Copyright © 2020 Breakside Inc.",
9
9
  "JSBundleEnvironments": {
10
10
  "html": "FontKit+HTML.js"
11
11
  },
12
12
  "JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
13
- "GitRevision": "1a4e4cfebe3671d6605583e7b24ff9665646b58f"
13
+ "GitRevision": "a030c131edd729dec656c535d8040085d2111960"
14
14
  },
15
15
  "Resources": [],
16
16
  "ResourceLookup": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "JSBundleType": "framework",
3
3
  "JSBundleIdentifier": "io.breakside.JSKit.Foundation",
4
- "JSBundleVersion": "2023.9.1",
4
+ "JSBundleVersion": "2023.11.0",
5
5
  "JSDevelopmentLanguage": "en",
6
6
  "JSCopyright": "Copyright © 2020 Breakside Inc.",
7
7
  "JSBundleEnvironments": {
@@ -9,5 +9,5 @@
9
9
  "node": "Foundation+Node.js"
10
10
  },
11
11
  "JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
12
- "GitRevision": "1a4e4cfebe3671d6605583e7b24ff9665646b58f"
12
+ "GitRevision": "a030c131edd729dec656c535d8040085d2111960"
13
13
  }
@@ -178,8 +178,6 @@ JSClass.prototype = {
178
178
  if (result instanceof Promise){
179
179
  return result.then(function(promiseResult){
180
180
  return promiseResult || obj;
181
- }, function(){
182
- return null;
183
181
  });
184
182
  }
185
183
  return result;
@@ -134,6 +134,14 @@ JSClass("JSFont", JSObject, {
134
134
  return JSFont.initWithDescriptor(descriptor, this.pointSize);
135
135
  },
136
136
 
137
+ bolderFont: function(){
138
+ var descriptor = this.descriptor.bolderDescriptor();
139
+ if (descriptor === null){
140
+ descriptor = this.descriptor.fontWithWeight(JSFont.Weight.bold);
141
+ }
142
+ return JSFont.initWithDescriptor(descriptor, this.pointSize);
143
+ },
144
+
137
145
  fontWithStyle: function(style){
138
146
  if (style == this.descriptor.style){
139
147
  return this;
@@ -43,6 +43,11 @@ JSClass("JSFontDescriptor", JSObject, {
43
43
  return JSFontDescriptor.descriptorWithFamily(this.family, weight, this.style) || this;
44
44
  },
45
45
 
46
+ bolderDescriptor: function(){
47
+ var weight = this._weight + 300;
48
+ return this.descriptorWithWeight(weight);
49
+ },
50
+
46
51
  descriptorWithStyle: function(style){
47
52
  return JSFontDescriptor.descriptorWithFamily(this.family, this.weight, style) || this;
48
53
  },
@@ -109,11 +109,16 @@ JSClass("JSTextFramesetter", JSObject, {
109
109
  if (remianingRange.length > 0 && lineLimit > lines.length + 1){
110
110
  // we got truncated because of height. Re-run the last line so it
111
111
  // gets broken according to truncation rules rather than word break
112
+ y = line.origin.y;
112
113
  lineRange = this._typesetter.suggestLineBreak(widthLimit, JSRange(line.range.location, line.range.length + remianingRange.length), paragraphStyle.lineBreakMode);
113
114
  line = this._typesetter.createLine(lineRange);
115
+ line.origin.y = y;
116
+ line = line.truncatedLine(widthLimit, undefined, true);
117
+ lines.push(line);
118
+ }else{
119
+ line = line.truncatedLine(widthLimit);
120
+ lines.push(line);
114
121
  }
115
- var truncated = line.truncatedLine(widthLimit);
116
- lines.push(truncated);
117
122
  }
118
123
  var frame = this.constructFrame(lines, size);
119
124
  this._alignLinesInFrame(frame);
@@ -191,8 +191,8 @@ JSClass("JSTextLine", JSObject, {
191
191
  return line;
192
192
  },
193
193
 
194
- truncatedLine: function(width, token){
195
- if (width + 0.1 >= this._size.width){
194
+ truncatedLine: function(width, token, force){
195
+ if (width + 0.1 >= this._size.width && force !== true){
196
196
  return this;
197
197
  }
198
198
 
@@ -335,7 +335,7 @@ JSClass("JSTextTypesetter", JSObject, {
335
335
  if (attributes.bold || attributes.italic){
336
336
  attributes = JSCopy(attributes);
337
337
  if (attributes.bold){
338
- attributes.font = attributes.font.fontWithWeight(JSFont.Weight.bold);
338
+ attributes.font = attributes.font.bolderFont();
339
339
  }
340
340
  if (attributes.italic){
341
341
  attributes.font = attributes.font.fontWithStyle(JSFont.Style.italic);
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.Foundation'] = {
3
3
  "Info": {
4
4
  "JSBundleType": "framework",
5
5
  "JSBundleIdentifier": "io.breakside.JSKit.Foundation",
6
- "JSBundleVersion": "2023.9.1",
6
+ "JSBundleVersion": "2023.11.0",
7
7
  "JSDevelopmentLanguage": "en",
8
8
  "JSCopyright": "Copyright © 2020 Breakside Inc.",
9
9
  "JSBundleEnvironments": {
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.Foundation'] = {
11
11
  "node": "Foundation+Node.js"
12
12
  },
13
13
  "JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
14
- "GitRevision": "1a4e4cfebe3671d6605583e7b24ff9665646b58f"
14
+ "GitRevision": "a030c131edd729dec656c535d8040085d2111960"
15
15
  },
16
16
  "Resources": [
17
17
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "JSBundleType": "framework",
3
3
  "JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
4
- "JSBundleVersion": "2023.9.1",
4
+ "JSBundleVersion": "2023.11.0",
5
5
  "JSDevelopmentLanguage": "en",
6
6
  "JSCopyright": "Copyright © 2020 Breakside Inc.",
7
7
  "JSBundleEnvironments": {
@@ -9,5 +9,5 @@
9
9
  "node": "SecurityKit+Node.js"
10
10
  },
11
11
  "JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
12
- "GitRevision": "1a4e4cfebe3671d6605583e7b24ff9665646b58f"
12
+ "GitRevision": "a030c131edd729dec656c535d8040085d2111960"
13
13
  }
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.SecurityKit'] = {
3
3
  "Info": {
4
4
  "JSBundleType": "framework",
5
5
  "JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
6
- "JSBundleVersion": "2023.9.1",
6
+ "JSBundleVersion": "2023.11.0",
7
7
  "JSDevelopmentLanguage": "en",
8
8
  "JSCopyright": "Copyright © 2020 Breakside Inc.",
9
9
  "JSBundleEnvironments": {
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.SecurityKit'] = {
11
11
  "node": "SecurityKit+Node.js"
12
12
  },
13
13
  "JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
14
- "GitRevision": "1a4e4cfebe3671d6605583e7b24ff9665646b58f"
14
+ "GitRevision": "a030c131edd729dec656c535d8040085d2111960"
15
15
  },
16
16
  "Resources": [],
17
17
  "ResourceLookup": {
package/Info.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "JSBundleType": "node",
3
3
  "JSBundleIdentifier": "io.breakside.jskit",
4
- "JSBundleVersion": "2023.9.1",
4
+ "JSBundleVersion": "2023.11.0",
5
5
  "JSExecutableName": "jskit",
6
6
  "NPMOrganization": "breakside",
7
7
  "JSResources": [
8
8
  "Tests/HTMLTestRunner.js",
9
9
  "Tests/NodeTestRunner.js"
10
10
  ],
11
- "GitRevision": "1a4e4cfebe3671d6605583e7b24ff9665646b58f"
11
+ "GitRevision": "a030c131edd729dec656c535d8040085d2111960"
12
12
  }
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.jskit'] = {
3
3
  "Info": {
4
4
  "JSBundleType": "node",
5
5
  "JSBundleIdentifier": "io.breakside.jskit",
6
- "JSBundleVersion": "2023.9.1",
6
+ "JSBundleVersion": "2023.11.0",
7
7
  "JSExecutableName": "jskit",
8
8
  "NPMOrganization": "breakside",
9
9
  "JSResources": [
10
10
  "Tests/HTMLTestRunner.js",
11
11
  "Tests/NodeTestRunner.js"
12
12
  ],
13
- "GitRevision": "1a4e4cfebe3671d6605583e7b24ff9665646b58f"
13
+ "GitRevision": "a030c131edd729dec656c535d8040085d2111960"
14
14
  },
15
15
  "Resources": [
16
16
  {
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.APIKit
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSIncludeDirectories:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.APIKitTesting
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.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.AuthKit
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.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.CSSOM
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -28,7 +28,7 @@ JSClass("CHPieChart", CHChart, {
28
28
  this.valueFormatter = JSNumberFormatter.init();
29
29
  this.valueFormatter.format = "0%";
30
30
  this.valueFormatter.multiplier = 100;
31
- this.labelFont = JSFont.systemFontOfSize(JSFont.Size.normal).fontWithWeight(JSFont.Weight.bold);
31
+ this.labelFont = JSFont.systemFontOfSize(JSFont.Size.normal).bolderFont();
32
32
  this.labelTextColor = JSColor.white;
33
33
  this.labelShadowColor = JSColor.black.colorWithAlpha(0.4);
34
34
  this.labelShadowOffset = JSPoint(1, 1);
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ChartKit
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2021 Breakside Inc.
6
6
  # JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ConferenceKit
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.DBKit
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.DOM
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.Dispatch
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSCopyright: Copyright © 2020 Breakside Inc.
5
5
  JSBundleEnvironments:
6
6
  html: Dispatch+HTML.js
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.FontKit
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.Foundation
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -178,8 +178,6 @@ JSClass.prototype = {
178
178
  if (result instanceof Promise){
179
179
  return result.then(function(promiseResult){
180
180
  return promiseResult || obj;
181
- }, function(){
182
- return null;
183
181
  });
184
182
  }
185
183
  return result;
@@ -134,6 +134,14 @@ JSClass("JSFont", JSObject, {
134
134
  return JSFont.initWithDescriptor(descriptor, this.pointSize);
135
135
  },
136
136
 
137
+ bolderFont: function(){
138
+ var descriptor = this.descriptor.bolderDescriptor();
139
+ if (descriptor === null){
140
+ descriptor = this.descriptor.fontWithWeight(JSFont.Weight.bold);
141
+ }
142
+ return JSFont.initWithDescriptor(descriptor, this.pointSize);
143
+ },
144
+
137
145
  fontWithStyle: function(style){
138
146
  if (style == this.descriptor.style){
139
147
  return this;
@@ -43,6 +43,11 @@ JSClass("JSFontDescriptor", JSObject, {
43
43
  return JSFontDescriptor.descriptorWithFamily(this.family, weight, this.style) || this;
44
44
  },
45
45
 
46
+ bolderDescriptor: function(){
47
+ var weight = this._weight + 300;
48
+ return this.descriptorWithWeight(weight);
49
+ },
50
+
46
51
  descriptorWithStyle: function(style){
47
52
  return JSFontDescriptor.descriptorWithFamily(this.family, this.weight, style) || this;
48
53
  },
@@ -109,11 +109,16 @@ JSClass("JSTextFramesetter", JSObject, {
109
109
  if (remianingRange.length > 0 && lineLimit > lines.length + 1){
110
110
  // we got truncated because of height. Re-run the last line so it
111
111
  // gets broken according to truncation rules rather than word break
112
+ y = line.origin.y;
112
113
  lineRange = this._typesetter.suggestLineBreak(widthLimit, JSRange(line.range.location, line.range.length + remianingRange.length), paragraphStyle.lineBreakMode);
113
114
  line = this._typesetter.createLine(lineRange);
115
+ line.origin.y = y;
116
+ line = line.truncatedLine(widthLimit, undefined, true);
117
+ lines.push(line);
118
+ }else{
119
+ line = line.truncatedLine(widthLimit);
120
+ lines.push(line);
114
121
  }
115
- var truncated = line.truncatedLine(widthLimit);
116
- lines.push(truncated);
117
122
  }
118
123
  var frame = this.constructFrame(lines, size);
119
124
  this._alignLinesInFrame(frame);
@@ -191,8 +191,8 @@ JSClass("JSTextLine", JSObject, {
191
191
  return line;
192
192
  },
193
193
 
194
- truncatedLine: function(width, token){
195
- if (width + 0.1 >= this._size.width){
194
+ truncatedLine: function(width, token, force){
195
+ if (width + 0.1 >= this._size.width && force !== true){
196
196
  return this;
197
197
  }
198
198
 
@@ -335,7 +335,7 @@ JSClass("JSTextTypesetter", JSObject, {
335
335
  if (attributes.bold || attributes.italic){
336
336
  attributes = JSCopy(attributes);
337
337
  if (attributes.bold){
338
- attributes.font = attributes.font.fontWithWeight(JSFont.Weight.bold);
338
+ attributes.font = attributes.font.bolderFont();
339
339
  }
340
340
  if (attributes.italic){
341
341
  attributes.font = attributes.font.fontWithStyle(JSFont.Style.italic);
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ImageKit
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.MediaKit
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.MediaKitUI
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.NotificationKit
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2021 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.PDFKit
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.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.QRKit
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.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.SearchKit
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.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.SecurityKit
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ServerKit
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ServerKitTesting
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.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: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -49,7 +49,7 @@ JSClass("TKTestSuite", JSObject, {
49
49
 
50
50
  getResourceData: function(resourceName, ext, completion, target){
51
51
  var metadata = this.bundle.metadataForResourceName(resourceName, ext);
52
- this.bundle.getResourceData(metadata, completion, target);
52
+ return this.bundle.getResourceData(metadata, completion, target);
53
53
  }
54
54
 
55
55
  });
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.UIKit
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -75,7 +75,7 @@ JSClass("UIAlertController", UIViewController, {
75
75
  this._titleLabel.maximumNumberOfLines = 2;
76
76
  this._titleLabel.textAlignment = JSTextAlignment.center;
77
77
  this._titleLabel.text = this.title;
78
- this._titleLabel.font = this._titleLabel.font.fontWithWeight(JSFont.Weight.bold);
78
+ this._titleLabel.font = this._titleLabel.font.bolderFont();
79
79
  this._primaryStackView.addSubview(this._titleLabel);
80
80
  }
81
81
  if (this.message !== null && this.message !== ''){
@@ -214,7 +214,7 @@ UIAlertController.ButtonStylers = Object.create({}, {
214
214
  configurable: true,
215
215
  get: function(){
216
216
  var styler = UIButtonDefaultStyler.init();
217
- styler.font = styler.font.fontWithPointSize(JSFont.Size.detail).fontWithWeight(JSFont.Weight.bold);
217
+ styler.font = styler.font.fontWithPointSize(JSFont.Size.detail).bolderFont();
218
218
  styler.normalTitleColor = JSColor.destructive;
219
219
  styler.activeTitleColor = JSColor.destructive.colorDarkenedByPercentage(0.2);
220
220
  styler.disabledTitleColor = JSColor.destructive.colorWithAlpha(0.5);
@@ -58,6 +58,7 @@ JSClass("UICollectionReusableView", UIView, {
58
58
  applyAttributes: function(attributes){
59
59
  this.untransformedFrame = attributes.frame;
60
60
  this.transform = attributes.transform;
61
+ this.zIndex = attributes.zIndex;
61
62
  if (!attributes.indexPath.isEqual(this.indexPath)){
62
63
  this.indexPath = JSIndexPath(attributes.indexPath);
63
64
  }
@@ -345,17 +345,6 @@ JSClass("UICollectionViewGridLayout", UICollectionViewLayout, {
345
345
  if (this._cachedLayout.footerFrame.size.height > 0 && rect.intersectsRect(this._cachedLayout.footerFrame)){
346
346
  attributes.push(this.layoutAttributesForSupplimentaryViewAtIndexPath(JSIndexPath([]), UICollectionViewGridLayout.SupplimentaryKind.footer));
347
347
  }
348
- if (this._headersStickToTop){
349
- var i = attributes.length - 1;
350
- var j = i;
351
- for (; i >= 0; --i){
352
- attrs = attributes[i];
353
- if (attrs.elementCategory === UICollectionView.ElementCategory.supplimentary && attrs.kind === UICollectionViewGridLayout.SupplimentaryKind.header){
354
- attributes.splice(i, 1);
355
- attributes.splice(j, 0, attrs);
356
- }
357
- }
358
- }
359
348
  return attributes;
360
349
  },
361
350
 
@@ -387,6 +376,7 @@ JSClass("UICollectionViewGridLayout", UICollectionViewLayout, {
387
376
  if (this._headersStickToTop){
388
377
  ty = Math.max(0, this.collectionView.contentView.bounds.origin.y - attributes.frame.origin.y);
389
378
  attributes.transform = JSAffineTransform.Translated(0, ty);
379
+ attributes.zIndex = 2;
390
380
  }
391
381
  return attributes;
392
382
  }
@@ -405,6 +395,7 @@ JSClass("UICollectionViewGridLayout", UICollectionViewLayout, {
405
395
  if (this._headersStickToTop){
406
396
  ty = Math.min(Math.max(0, this.collectionView.contentView.bounds.origin.y - attributes.frame.origin.y + this._cachedLayout.headerFrame.size.height), (sectionLayout.frame.origin.y + sectionLayout.frame.size.height) - (sectionLayout.headerFrame.origin.y + sectionLayout.headerFrame.size.height));
407
397
  attributes.transform = JSAffineTransform.Translated(0, ty);
398
+ attributes.zIndex = 1;
408
399
  }
409
400
  return attributes;
410
401
  }
@@ -97,6 +97,7 @@ JSClass("UICollectionViewLayoutAttributes", JSObject, {
97
97
  rowIndex: 0,
98
98
  columnIndex: 0,
99
99
  transform: null,
100
+ zIndex: 0,
100
101
 
101
102
  elementIdentifier: JSReadOnlyProperty(),
102
103
 
@@ -56,7 +56,8 @@ JSClass("UIHTMLDisplayServerCanvasContext", UIHTMLDisplayServerContext, {
56
56
  cornerRadius: true,
57
57
  shadow: true,
58
58
  contentVisualEffect: true,
59
- backgroundVisualEffect: true
59
+ backgroundVisualEffect: true,
60
+ zIndex: true,
60
61
  };
61
62
  this._imageElements = [];
62
63
  this._canvasElements = [];
@@ -377,6 +378,10 @@ JSClass("UIHTMLDisplayServerCanvasContext", UIHTMLDisplayServerContext, {
377
378
  this.style.filter = layer.presentation.contentVisualEffect ? layer.presentation.contentVisualEffect.cssFilterString() : '';
378
379
  },
379
380
 
381
+ updateHTMLProperty_zIndex: function(layer){
382
+ this.style.zIndex = layer.zIndex;
383
+ },
384
+
380
385
  // --------------------------------------------------------------------
381
386
  // MARK: - Managing Canvas Elements & Context
382
387
 
@@ -64,8 +64,8 @@ JSClass("UIHTMLTextLine", JSTextLine, {
64
64
  // // HTML does this for us
65
65
  // },
66
66
 
67
- truncatedLine: function(width, token){
68
- if (width + 0.1 >= this._size.width){
67
+ truncatedLine: function(width, token, force){
68
+ if (width + 0.1 >= this._size.width && force !== true){
69
69
  return this;
70
70
  }
71
71
 
@@ -119,12 +119,13 @@ JSClass("UIHTMLTextLine", JSTextLine, {
119
119
  line.size.width += tokenRun.size.width;
120
120
 
121
121
  var iterator = run.textNode.nodeValue.userPerceivedCharacterIterator(run.textNode.nodeValue.length - 1);
122
- while (iterator.character !== null && iterator.isMandatoryLineBreak){
123
- iterator.decrement();
122
+ while (iterator.firstCharacter !== null && iterator.isMandatoryLineBreak){
124
123
  run.range.length -= iterator.range.length;
125
124
  line.range.length -= iterator.range.length;
125
+ run.textNode.nodeValue = run.textNode.nodeValue.substr(0, run.textNode.nodeValue.length - iterator.range.length);
126
+ iterator.decrement();
126
127
  }
127
- while (iterator.character !== null && line.size.width > width){
128
+ while (iterator.firstCharacter !== null && line.size.width > width){
128
129
  metrics = this.canvasContext.measureText(iterator.utf16);
129
130
  run.size.width -= metrics.width;
130
131
  run.range.length -= iterator.range.length;
@@ -80,6 +80,7 @@ JSClass("UILayer", JSObject, {
80
80
  shadowOffset: UILayerAnimatedProperty(),
81
81
  shadowRadius: UILayerAnimatedProperty(),
82
82
  clipsToBounds: JSDynamicProperty('_clipsToBounds', false),
83
+ zIndex: JSDynamicProperty("_zIndex", 0),
83
84
  model: null,
84
85
  presentation: null,
85
86
  superlayer: null,
@@ -300,6 +301,34 @@ JSClass("UILayer", JSObject, {
300
301
  return path;
301
302
  },
302
303
 
304
+ setZIndex: function(zIndex){
305
+ if (zIndex !== this._zIndex){
306
+ var previousZIndex = this._zIndex;
307
+ this._zIndex = zIndex;
308
+ this.didChangeProperty('zIndex');
309
+ if (this.superlayer !== null){
310
+ if (previousZIndex === 0){
311
+ this.superlayer.numberOfSublayersWithNonZeroZIndex += 1;
312
+ }else{
313
+ if (zIndex === 0){
314
+ this.superlayer.numberOfSublayersWithNonZeroZIndex -= 1;
315
+ }
316
+ }
317
+ this.superlayer.setNeedsZIndexOrderedSublayers();
318
+ }
319
+ }
320
+ },
321
+
322
+ numberOfSublayersWithNonZeroZIndex: 0,
323
+ zIndexOrderedSublayers: null,
324
+
325
+ setNeedsZIndexOrderedSublayers: function(){
326
+ this.zIndexOrderedSublayers = null;
327
+ if (this.delegate && this.delegate.layerDidChangeZIndexSublayers){
328
+ this.delegate.layerDidChangeZIndexSublayers(this);
329
+ }
330
+ },
331
+
303
332
  // -------------------------------------------------------------------------
304
333
  // MARK: - Shadows
305
334
 
@@ -340,6 +369,12 @@ JSClass("UILayer", JSObject, {
340
369
  }
341
370
  }
342
371
  this.sublayers.splice(index, 0, sublayer);
372
+ if (sublayer.zIndex !== 0){
373
+ this.numberOfSublayersWithNonZeroZIndex += 1;
374
+ this.setNeedsZIndexOrderedSublayers();
375
+ }else if (this.numberOfSublayersWithNonZeroZIndex > 0){
376
+ this.setNeedsZIndexOrderedSublayers();
377
+ }
343
378
  sublayer.sublayerIndex = index;
344
379
  for (i = sublayer.sublayerIndex + 1, l = this.sublayers.length; i < l; ++i){
345
380
  this.sublayers[i].sublayerIndex += 1;
@@ -374,6 +409,12 @@ JSClass("UILayer", JSObject, {
374
409
  for (var i = sublayer.sublayerIndex + 1, l = this.sublayers.length; i < l; ++i){
375
410
  this.sublayers[i].sublayerIndex -= 1;
376
411
  }
412
+ if (this.numberOfSublayersWithNonZeroZIndex > 0){
413
+ this.setNeedsZIndexOrderedSublayers();
414
+ }
415
+ if (sublayer.zIndex !== 0){
416
+ this.numberOfSublayersWithNonZeroZIndex -= 1;
417
+ }
377
418
  this.sublayers.splice(sublayer.sublayerIndex,1);
378
419
  sublayer.superlayer = null;
379
420
  sublayer.sublayerIndex = null;
@@ -540,8 +581,16 @@ JSClass("UILayer", JSObject, {
540
581
  var sublayer;
541
582
  var locationInSublayer;
542
583
  var hit = null;
543
- for (var i = this.sublayers.length - 1; i >= 0 && hit === null; --i){
544
- sublayer = this.sublayers[i];
584
+ var sublayers = this.sublayers;
585
+ if (this.numberOfSublayersWithNonZeroZIndex > 0){
586
+ if (this.zIndexOrderedSublayers === null){
587
+ this.zIndexOrderedSublayers = JSCopy(sublayers);
588
+ this.zIndexOrderedSublayers.sort(UILayer.compareZIndex);
589
+ }
590
+ sublayers = this.zIndexOrderedSublayers;
591
+ }
592
+ for (var i = sublayers.length - 1; i >= 0 && hit === null; --i){
593
+ sublayer = sublayers[i];
545
594
  locationInSublayer = this.convertPointToLayer(locationInLayer, sublayer);
546
595
  if (!sublayer.hidden && sublayer.presentation.alpha > 0 && (!sublayer.clipsToBounds || sublayer.containsPoint(locationInSublayer))){
547
596
  hit = sublayer.hitTest(locationInSublayer);
@@ -796,8 +845,17 @@ JSClass("UILayer", JSObject, {
796
845
  if (includeSublayers && !hidden){
797
846
  var sublayer;
798
847
  var transform;
799
- for (var i = 0, l = this.sublayers.length; i < l; ++i){
800
- sublayer = this.sublayers[i];
848
+ var sublayers = this.sublayers;
849
+ if (this.numberOfSublayersWithNonZeroZIndex > 0){
850
+ if (this.zIndexOrderedSublayers === null){
851
+ this.zIndexOrderedSublayers = JSCopy(sublayers);
852
+ this.zIndexOrderedSublayers.sort(UILayer.compareZIndex);
853
+ }
854
+ sublayers = this.zIndexOrderedSublayers;
855
+ }
856
+ sublayers.sort(function(a, b){ return a._zIndex - b._zIndex; });
857
+ for (var i = 0, l = sublayers.length; i < l; ++i){
858
+ sublayer = sublayers[i];
801
859
  if (!sublayer.hidden){
802
860
  context.save();
803
861
  transform = sublayer._presentationTransformFromSuperlayer();
@@ -842,6 +900,10 @@ UILayer.Path = {
842
900
  shadow: 2
843
901
  };
844
902
 
903
+ UILayer.compareZIndex = function(a, b){
904
+ return a._zIndex - b._zIndex;
905
+ };
906
+
845
907
  JSContext.definePropertiesFromExtensions({
846
908
 
847
909
  drawsHiddenLayers: false,
@@ -2421,6 +2421,9 @@ JSClass("UIListView", UIScrollView, {
2421
2421
  if (this._touch.cell){
2422
2422
  this._touch.cell.active = false;
2423
2423
  this._setSelectedIndexPaths([this._touch.cell.indexPath], {notifyDelegate: true});
2424
+ if (this.delegate && this.delegate.listViewDidFinishSelectingCellAtIndexPath){
2425
+ this.delegate.listViewDidFinishSelectingCellAtIndexPath(this, this._touch.cell.indexPath);
2426
+ }
2424
2427
  }
2425
2428
  this._touch = null;
2426
2429
  }
@@ -3135,7 +3138,7 @@ JSClass("UIListViewDefaultStyler", UIListViewStyler, {
3135
3138
  this.cellFont = JSFont.systemFontOfSize(JSFont.Size.normal);
3136
3139
  }
3137
3140
  if (this.headerFont === null){
3138
- this.headerFont = JSFont.systemFontOfSize(JSFont.Size.normal).fontWithWeight(JSFont.Weight.bold);
3141
+ this.headerFont = JSFont.systemFontOfSize(JSFont.Size.normal).bolderFont();
3139
3142
  }
3140
3143
  if (this.cellTextColor === null){
3141
3144
  this.cellTextColor = JSColor.text;
@@ -882,7 +882,7 @@ JSClass("UIMenuBarItemView", UIView, {
882
882
  if (this._titleLabel){
883
883
  var font = this._menuBar.font;
884
884
  if (this._item === this._menuBar.primaryMenuItem){
885
- font = font.fontWithWeight(JSFont.Weight.bold);
885
+ font = font.bolderFont();
886
886
  }
887
887
  this._titleLabel.font = font;
888
888
  this._titleLabel.textColor = textColor;
@@ -57,4 +57,8 @@ JSClass("UIScreen", JSObject, {
57
57
  traitCollectionDidChange: function(){
58
58
  }
59
59
 
60
- });
60
+ });
61
+
62
+ UIScreen.Notification = {
63
+ frameChanged: "UIScreenFrameChanged"
64
+ };
@@ -138,6 +138,9 @@ JSClass('UIView', UIResponder, {
138
138
  if (spec.containsKey("tag")){
139
139
  this.tag = spec.valueForKey("tag");
140
140
  }
141
+ if (spec.containsKey("zIndex")){
142
+ this.zIndex = spec.valueForKey("zIndex", Number);
143
+ }
141
144
  var i, l;
142
145
  if (spec.containsKey("gestureRecognizers")){
143
146
  var recognizers = spec.valueForKey("gestureRecognizers");
@@ -193,6 +196,7 @@ JSClass('UIView', UIResponder, {
193
196
  shadowOffset: UIViewLayerProperty(),
194
197
  shadowRadius: UIViewLayerProperty(),
195
198
  contentVisualEffect: UIViewLayerProperty(),
199
+ zIndex: UIViewLayerProperty(),
196
200
  cursor: JSDynamicProperty(),
197
201
  tooltip: null,
198
202
 
@@ -207,6 +211,10 @@ JSClass('UIView', UIResponder, {
207
211
  }
208
212
  },
209
213
 
214
+ layerDidChangeZIndexSublayers: function(layer){
215
+ this.zIndexOrderedSubviews = null;
216
+ },
217
+
210
218
  // -------------------------------------------------------------------------
211
219
  // MARK: - Superview
212
220
 
@@ -967,6 +975,8 @@ JSClass('UIView', UIResponder, {
967
975
 
968
976
  userInteractionEnabled: true,
969
977
 
978
+ zIndexOrderedSubviews: null,
979
+
970
980
  containsPoint: function(point){
971
981
  return this.layer.containsPoint(point);
972
982
  },
@@ -975,11 +985,19 @@ JSClass('UIView', UIResponder, {
975
985
  var subview;
976
986
  var locationInSubview;
977
987
  var hit = null;
978
- for (var i = this.subviews.length - 1; i >= 0 && hit === null; --i){
979
- subview = this.subviews[i];
988
+ var subviews = this.subviews;
989
+ if (this.layer.numberOfSublayersWithNonZeroZIndex > 0){
990
+ if (this.zIndexOrderedSubviews === null){
991
+ this.zIndexOrderedSubviews = JSCopy(subviews);
992
+ this.zIndexOrderedSubviews.sort(UIView.compareZIndex);
993
+ }
994
+ subviews = this.zIndexOrderedSubviews;
995
+ }
996
+ for (var i = subviews.length - 1; i >= 0 && hit === null; --i){
997
+ subview = subviews[i];
980
998
  locationInSubview = this.layer.convertPointToLayer(locationInView, subview.layer);
981
999
  if (!subview.hidden && subview.layer.presentation.alpha > 0 && (!subview.clipsToBounds || subview.containsPoint(locationInSubview))){
982
- hit = subview.hitTest(locationInSubview);
1000
+ hit = subview.hitTest(locationInSubview);
983
1001
  }
984
1002
  }
985
1003
  if (hit === null && this.userInteractionEnabled && this.containsPoint(locationInView)){
@@ -1204,4 +1222,8 @@ UIView.animateWithOptions = function(options, animations, callback){
1204
1222
  UIView.noIntrinsicSize = -1;
1205
1223
 
1206
1224
  UIView.Corners = UILayer.Corners;
1207
- UIView.Sides = UILayer.Sides;
1225
+ UIView.Sides = UILayer.Sides;
1226
+
1227
+ UIView.compareZIndex = function(a, b){
1228
+ return a.layer._zIndex - b.layer._zIndex;
1229
+ };
@@ -54,4 +54,12 @@ UIDesaturateEffect.definePropertiesFromExtensions({
54
54
  return "saturate(%f)".sprintf(1 - this.percentage);
55
55
  }
56
56
 
57
+ });
58
+
59
+ UIDarkenEffect.definePropertiesFromExtensions({
60
+
61
+ cssFilterString: function(){
62
+ return "brightness(%f)".sprintf(1 - this.percentage);
63
+ }
64
+
57
65
  });
@@ -118,4 +118,29 @@ JSClass("UIDesaturateEffect", UIVisualEffect, {
118
118
  return UIDesaturateEffect.initWithPercentage(0);
119
119
  }
120
120
 
121
+ });
122
+
123
+ JSClass("UIDarkenEffect", UIVisualEffect, {
124
+
125
+ percentage: 1,
126
+
127
+ initWithPercentage: function(percentage){
128
+ this.percentage = percentage;
129
+ },
130
+
131
+ initWithSpec: function(spec){
132
+ UIDesaturateEffect.$super.initWithSpec.call(this, spec);
133
+ if (spec.containsKey("percentage")){
134
+ this.percentage = spec.valueForKey("percentage", Number);
135
+ }
136
+ },
137
+
138
+ animationInterpolation: function(from, to, progress){
139
+ return UIDesaturateEffect.initWithPercentage(from.percentage + (to.percentage - from.percentage) * progress);
140
+ },
141
+
142
+ defaultAnimationValue: function(){
143
+ return UIDesaturateEffect.initWithPercentage(0);
144
+ }
145
+
121
146
  });
@@ -306,6 +306,16 @@ JSClass('UIWindow', UIView, {
306
306
  }
307
307
  },
308
308
 
309
+ zIndex: JSDynamicProperty(),
310
+
311
+ setZIndex: function(zIndex){
312
+ logger.warn("setting zIndex on UIWindow has no effect");
313
+ },
314
+
315
+ getZIndex: function(){
316
+ return 0;
317
+ },
318
+
309
319
  // -------------------------------------------------------------------------
310
320
  // MARK: Traits
311
321
 
@@ -22,6 +22,7 @@
22
22
  // #import "UIDraggingSession.js"
23
23
  // #import "UIUserInterface.js"
24
24
  // #import "UIColorSpace.js"
25
+ // #import "UIScreen.js"
25
26
  'use strict';
26
27
 
27
28
  (function(){
@@ -273,6 +274,7 @@ JSClass("UIWindowServer", JSObject, {
273
274
  window = this.windowStack[i];
274
275
  this.layoutWindow(window);
275
276
  }
277
+ JSNotificationCenter.shared.post(UIScreen.Notification.frameChanged, this, {screen: this.screen});
276
278
  },
277
279
 
278
280
  layoutWindow: function(window){
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.UIKitTesting
3
- JSBundleVersion: 2023.9.1
3
+ JSBundleVersion: 2023.11.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "node": ">=10.10.0"
10
10
  },
11
11
  "name": "@breakside/jskit",
12
- "version": "2023.9.1",
12
+ "version": "2023.11.0",
13
13
  "license": "SEE LICENSE IN LICENSE.txt",
14
14
  "files": [
15
15
  "*"