@breakside/jskit 2022.9.0 → 2022.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) 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/JS/FNTFontDescriptor.js +9 -6
  5. package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
  6. package/Frameworks/Foundation.jsframework/Info.json +2 -2
  7. package/Frameworks/Foundation.jsframework/JS/JSEnvironment.js +5 -0
  8. package/Frameworks/Foundation.jsframework/JS/JSHTMLHTTPClient.js +9 -1
  9. package/Frameworks/Foundation.jsframework/JS/JSImage.js +11 -4
  10. package/Frameworks/Foundation.jsframework/JS/JSSynchronizer.js +1 -0
  11. package/Frameworks/Foundation.jsframework/JS/JSURLResponse.js +10 -0
  12. package/Frameworks/Foundation.jsframework/JS/JSUserDefaults.js +14 -1
  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/io.breakside.jskit-bundle.js +2 -2
  18. package/Root/Frameworks/APIKit/Info.yaml +1 -1
  19. package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
  20. package/Root/Frameworks/AuthKit/Info.yaml +1 -1
  21. package/Root/Frameworks/CSSOM/Info.yaml +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/FNTFontDescriptor.js +9 -6
  28. package/Root/Frameworks/FontKit/Info.yaml +1 -1
  29. package/Root/Frameworks/Foundation/Info.yaml +1 -1
  30. package/Root/Frameworks/Foundation/JSEnvironment.js +5 -0
  31. package/Root/Frameworks/Foundation/JSHTMLHTTPClient.js +9 -1
  32. package/Root/Frameworks/Foundation/JSImage.js +11 -4
  33. package/Root/Frameworks/Foundation/JSSynchronizer.js +1 -0
  34. package/Root/Frameworks/Foundation/JSURLResponse.js +10 -0
  35. package/Root/Frameworks/Foundation/JSUserDefaults.js +14 -1
  36. package/Root/Frameworks/ImageKit/Info.yaml +1 -1
  37. package/Root/Frameworks/MediaKit/Info.yaml +1 -1
  38. package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
  39. package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
  40. package/Root/Frameworks/PDFKit/Info.yaml +1 -1
  41. package/Root/Frameworks/QRKit/Info.yaml +1 -1
  42. package/Root/Frameworks/SearchKit/Info.yaml +1 -1
  43. package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
  44. package/Root/Frameworks/ServerKit/Info.yaml +1 -1
  45. package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
  46. package/Root/Frameworks/TestKit/Info.yaml +1 -1
  47. package/Root/Frameworks/UIKit/Info.yaml +1 -1
  48. package/Root/Frameworks/UIKit/UIApplication.js +15 -1
  49. package/Root/Frameworks/UIKit/UICollectionReusableView.js +1 -1
  50. package/Root/Frameworks/UIKit/UICollectionView.js +99 -13
  51. package/Root/Frameworks/UIKit/UICollectionViewCell.js +11 -1
  52. package/Root/Frameworks/UIKit/UICollectionViewLayout.js +1 -1
  53. package/Root/Frameworks/UIKit/UIColorPanel.js +4 -1
  54. package/Root/Frameworks/UIKit/UIDraggingSession.js +7 -0
  55. package/Root/Frameworks/UIKit/UIHTMLTextField.js +3 -1
  56. package/Root/Frameworks/UIKit/UIHTMLWindowServer.js +13 -1
  57. package/Root/Frameworks/UIKit/UIMenu.js +12 -5
  58. package/Root/Frameworks/UIKit/UIMenuItem.js +6 -0
  59. package/Root/Frameworks/UIKit/UIMenuView.js +12 -1
  60. package/Root/Frameworks/UIKit/UIPressGestureRecognizer.js +13 -2
  61. package/Root/Frameworks/UIKit/UIScrollView.js +15 -12
  62. package/Root/Frameworks/UIKit/UISegmentedControl.js +15 -0
  63. package/Root/Frameworks/UIKit/UISlider.js +9 -0
  64. package/Root/Frameworks/UIKit/UIStackView.js +16 -0
  65. package/Root/Frameworks/UIKit/UITabView.js +5 -6
  66. package/Root/Frameworks/UIKit/UITextField.js +2 -0
  67. package/Root/Frameworks/UIKit/UIView.js +1 -1
  68. package/Root/Frameworks/UIKit/UIWindow.js +32 -1
  69. package/Root/Frameworks/UIKit/UIWindowServer.js +3 -0
  70. package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
  71. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "JSBundleType": "framework",
3
3
  "JSBundleIdentifier": "io.breakside.JSKit.DOM",
4
- "JSBundleVersion": "2022.9.0",
4
+ "JSBundleVersion": "2022.22.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": "5ede7ae27af07f45b758866e3bdb9b120359da00"
12
+ "GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
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": "2022.9.0",
6
+ "JSBundleVersion": "2022.22.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": "5ede7ae27af07f45b758866e3bdb9b120359da00"
14
+ "GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
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": "2022.9.0",
4
+ "JSBundleVersion": "2022.22.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": "5ede7ae27af07f45b758866e3bdb9b120359da00"
11
+ "GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
12
12
  }
@@ -42,13 +42,16 @@ JSClass("FNTFontDescriptor", JSDataFontDescriptor, {
42
42
  }
43
43
  var os2 = this.font.tables['OS/2'];
44
44
  if (os2){
45
- this._weight = Math.floor(os2.weight / 100) * 100;
46
- this._style = (os2.selection & 0x1) ? JSFont.Style.italic : JSFont.Style.normal;
45
+ this._weight = Math.floor(os2.usWeightClass / 100) * 100;
46
+ this._style = (os2.fsSelection & 0x1) ? JSFont.Style.italic : JSFont.Style.normal;
47
+ }
48
+ var name = font.tables.name;
49
+ if (name){
50
+ this._family = name.family;
51
+ this._postScriptName = name.postscript;
52
+ this._face = name.face;
53
+ this._name = name.fullName;
47
54
  }
48
- // this._family
49
- // this._name
50
- // this._face
51
- // this._postScriptName
52
55
  this._characterToGlyphMap = {};
53
56
  this._glyphToCharacterMap = {};
54
57
  },
@@ -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": "2022.9.0",
6
+ "JSBundleVersion": "2022.22.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": "5ede7ae27af07f45b758866e3bdb9b120359da00"
13
+ "GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
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": "2022.9.0",
4
+ "JSBundleVersion": "2022.22.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": "5ede7ae27af07f45b758866e3bdb9b120359da00"
12
+ "GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
13
13
  }
@@ -112,6 +112,11 @@ JSClass("JSEnvironment", JSObject, {
112
112
  }
113
113
  }
114
114
  return null;
115
+ },
116
+
117
+ booleanForName: function(name){
118
+ var stringValue = this.stringForName(name);
119
+ return (stringValue === 'true' || stringValue === '1' || stringValue === 'yes' || stringValue === 'on');
115
120
  }
116
121
 
117
122
  });
@@ -38,7 +38,15 @@ JSClass("JSHTMLHTTPClient", JSObject, {
38
38
  }
39
39
  };
40
40
  var failEventHandler = function(e){
41
- complete(new Error(e.type));
41
+ if (e.type == "error"){
42
+ complete(new Error("XMLHttpRequest error (network down, timeout, CORS, etc)"));
43
+ }else if (e.type == "timeout"){
44
+ complete(new Error("XMLHttpRequest timeout"));
45
+ }else if (e.type == "abort"){
46
+ complete(new Error("XMLHttpRequest aborted"));
47
+ }else{
48
+ complete(new Error("XMLHttpRequest failed with event: " + e.type));
49
+ }
42
50
  };
43
51
  try {
44
52
  var response = null;
@@ -449,14 +449,21 @@ JSClass("_JSURLImage", JSImage, {
449
449
 
450
450
  getData: function(completion, target){
451
451
  if (!completion){
452
- completion = Promise.completion(Promise.resolveNonNull);
452
+ completion = Promise.completion(Promise.rejectNonNullSecondArgument);
453
453
  }
454
454
  var session = JSURLSession.shared;
455
455
  var task = session.dataTaskWithURL(this.url, function(error){
456
- if (error !== null || task.response.statusClass != JSURLResponse.StatusClass.success){
457
- completion.call(target, null);
456
+ if (error !== null){
457
+ completion.call(target, null, error);
458
+ return;
459
+ }
460
+ try{
461
+ task.response.assertSuccess();
462
+ }catch (e){
463
+ completion.call(target, null, e);
464
+ return;
458
465
  }
459
- completion.call(target, task.response.data);
466
+ completion.call(target, task.response.data, null);
460
467
  });
461
468
  task.resume();
462
469
  return completion.promise;
@@ -93,6 +93,7 @@ JSClass("JSSynchronizer", JSObject, {
93
93
  if (error === null || error === undefined){
94
94
  controller._setState(JSSynchronizer.State.success);
95
95
  }else{
96
+ logger.error(error);
96
97
  controller._setState(JSSynchronizer.State.error);
97
98
  controller.error = error;
98
99
  }
@@ -163,6 +163,16 @@ JSURLResponse.StatusClass = {
163
163
  serverError: 5
164
164
  };
165
165
 
166
+ JSURLResponse.error = function(statusCode, object){
167
+ var response = JSURLResponse.init();
168
+ response.statusCode = statusCode;
169
+ if (object !== undefined){
170
+ response.data = JSON.stringify(object).utf8();
171
+ response.headerMap.add("Content-Type", response.jsonMime);
172
+ }
173
+ return new JSURLResponseError(response);
174
+ };
175
+
166
176
  JSGlobalObject.JSURLResponseError = function(response){
167
177
  if (this === undefined){
168
178
  return new JSURLResponseError();
@@ -125,11 +125,19 @@ JSClass("JSUserDefaults", JSObject, {
125
125
  this._definePropertyForKey(key);
126
126
  },
127
127
 
128
+ deleteValueForKey: function(key){
129
+ if (this._values === null){
130
+ throw new Error("JSUserDefaults is closed, cannot set value. Be sure to call open() first.");
131
+ }
132
+ delete this._values[key];
133
+ this._persistAfterDelay();
134
+ },
135
+
128
136
  // MARK: - Register defaults
129
137
 
130
138
  registerDefaults: function(defaults){
131
- this._defaults = defaults;
132
139
  for (var key in defaults){
140
+ this._defaults[key] = defaults[key];
133
141
  this._definePropertyForKey(key);
134
142
  }
135
143
  },
@@ -141,12 +149,17 @@ JSClass("JSUserDefaults", JSObject, {
141
149
  return this.valueForKey(key);
142
150
  },
143
151
  set: function JSUserDefaults_setValue(value){
152
+ this.willChangeValueForKey(key);
144
153
  this.setValueForKey(value, key);
154
+ this.didChangeValueForKey(key);
145
155
  }
146
156
  });
147
157
  }
148
158
  },
149
159
 
160
+ defineObservablePropertyForKey: function(){
161
+ },
162
+
150
163
  // MARK: - Saving to Persistent Storage
151
164
 
152
165
  _persistScheduled: false,
@@ -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": "2022.9.0",
6
+ "JSBundleVersion": "2022.22.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": "5ede7ae27af07f45b758866e3bdb9b120359da00"
14
+ "GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
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": "2022.9.0",
4
+ "JSBundleVersion": "2022.22.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": "5ede7ae27af07f45b758866e3bdb9b120359da00"
12
+ "GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
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": "2022.9.0",
6
+ "JSBundleVersion": "2022.22.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": "5ede7ae27af07f45b758866e3bdb9b120359da00"
14
+ "GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
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": "2022.9.0",
4
+ "JSBundleVersion": "2022.22.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": "5ede7ae27af07f45b758866e3bdb9b120359da00"
11
+ "GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
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": "2022.9.0",
6
+ "JSBundleVersion": "2022.22.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": "5ede7ae27af07f45b758866e3bdb9b120359da00"
13
+ "GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
14
14
  },
15
15
  "Resources": [
16
16
  {
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.APIKit
3
- JSBundleVersion: 2022.9.0
3
+ JSBundleVersion: 2022.22.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: 2022.9.0
3
+ JSBundleVersion: 2022.22.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: 2022.9.0
3
+ JSBundleVersion: 2022.22.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: 2022.9.0
3
+ JSBundleVersion: 2022.22.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.ChartKit
3
- JSBundleVersion: 2022.9.0
3
+ JSBundleVersion: 2022.22.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: 2022.9.0
3
+ JSBundleVersion: 2022.22.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: 2022.9.0
3
+ JSBundleVersion: 2022.22.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: 2022.9.0
3
+ JSBundleVersion: 2022.22.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: 2022.9.0
3
+ JSBundleVersion: 2022.22.0
4
4
  JSCopyright: Copyright © 2020 Breakside Inc.
5
5
  JSBundleEnvironments:
6
6
  html: Dispatch+HTML.js
@@ -42,13 +42,16 @@ JSClass("FNTFontDescriptor", JSDataFontDescriptor, {
42
42
  }
43
43
  var os2 = this.font.tables['OS/2'];
44
44
  if (os2){
45
- this._weight = Math.floor(os2.weight / 100) * 100;
46
- this._style = (os2.selection & 0x1) ? JSFont.Style.italic : JSFont.Style.normal;
45
+ this._weight = Math.floor(os2.usWeightClass / 100) * 100;
46
+ this._style = (os2.fsSelection & 0x1) ? JSFont.Style.italic : JSFont.Style.normal;
47
+ }
48
+ var name = font.tables.name;
49
+ if (name){
50
+ this._family = name.family;
51
+ this._postScriptName = name.postscript;
52
+ this._face = name.face;
53
+ this._name = name.fullName;
47
54
  }
48
- // this._family
49
- // this._name
50
- // this._face
51
- // this._postScriptName
52
55
  this._characterToGlyphMap = {};
53
56
  this._glyphToCharacterMap = {};
54
57
  },
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.FontKit
3
- JSBundleVersion: 2022.9.0
3
+ JSBundleVersion: 2022.22.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: 2022.9.0
3
+ JSBundleVersion: 2022.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -112,6 +112,11 @@ JSClass("JSEnvironment", JSObject, {
112
112
  }
113
113
  }
114
114
  return null;
115
+ },
116
+
117
+ booleanForName: function(name){
118
+ var stringValue = this.stringForName(name);
119
+ return (stringValue === 'true' || stringValue === '1' || stringValue === 'yes' || stringValue === 'on');
115
120
  }
116
121
 
117
122
  });
@@ -38,7 +38,15 @@ JSClass("JSHTMLHTTPClient", JSObject, {
38
38
  }
39
39
  };
40
40
  var failEventHandler = function(e){
41
- complete(new Error(e.type));
41
+ if (e.type == "error"){
42
+ complete(new Error("XMLHttpRequest error (network down, timeout, CORS, etc)"));
43
+ }else if (e.type == "timeout"){
44
+ complete(new Error("XMLHttpRequest timeout"));
45
+ }else if (e.type == "abort"){
46
+ complete(new Error("XMLHttpRequest aborted"));
47
+ }else{
48
+ complete(new Error("XMLHttpRequest failed with event: " + e.type));
49
+ }
42
50
  };
43
51
  try {
44
52
  var response = null;
@@ -449,14 +449,21 @@ JSClass("_JSURLImage", JSImage, {
449
449
 
450
450
  getData: function(completion, target){
451
451
  if (!completion){
452
- completion = Promise.completion(Promise.resolveNonNull);
452
+ completion = Promise.completion(Promise.rejectNonNullSecondArgument);
453
453
  }
454
454
  var session = JSURLSession.shared;
455
455
  var task = session.dataTaskWithURL(this.url, function(error){
456
- if (error !== null || task.response.statusClass != JSURLResponse.StatusClass.success){
457
- completion.call(target, null);
456
+ if (error !== null){
457
+ completion.call(target, null, error);
458
+ return;
459
+ }
460
+ try{
461
+ task.response.assertSuccess();
462
+ }catch (e){
463
+ completion.call(target, null, e);
464
+ return;
458
465
  }
459
- completion.call(target, task.response.data);
466
+ completion.call(target, task.response.data, null);
460
467
  });
461
468
  task.resume();
462
469
  return completion.promise;
@@ -93,6 +93,7 @@ JSClass("JSSynchronizer", JSObject, {
93
93
  if (error === null || error === undefined){
94
94
  controller._setState(JSSynchronizer.State.success);
95
95
  }else{
96
+ logger.error(error);
96
97
  controller._setState(JSSynchronizer.State.error);
97
98
  controller.error = error;
98
99
  }
@@ -163,6 +163,16 @@ JSURLResponse.StatusClass = {
163
163
  serverError: 5
164
164
  };
165
165
 
166
+ JSURLResponse.error = function(statusCode, object){
167
+ var response = JSURLResponse.init();
168
+ response.statusCode = statusCode;
169
+ if (object !== undefined){
170
+ response.data = JSON.stringify(object).utf8();
171
+ response.headerMap.add("Content-Type", response.jsonMime);
172
+ }
173
+ return new JSURLResponseError(response);
174
+ };
175
+
166
176
  JSGlobalObject.JSURLResponseError = function(response){
167
177
  if (this === undefined){
168
178
  return new JSURLResponseError();
@@ -125,11 +125,19 @@ JSClass("JSUserDefaults", JSObject, {
125
125
  this._definePropertyForKey(key);
126
126
  },
127
127
 
128
+ deleteValueForKey: function(key){
129
+ if (this._values === null){
130
+ throw new Error("JSUserDefaults is closed, cannot set value. Be sure to call open() first.");
131
+ }
132
+ delete this._values[key];
133
+ this._persistAfterDelay();
134
+ },
135
+
128
136
  // MARK: - Register defaults
129
137
 
130
138
  registerDefaults: function(defaults){
131
- this._defaults = defaults;
132
139
  for (var key in defaults){
140
+ this._defaults[key] = defaults[key];
133
141
  this._definePropertyForKey(key);
134
142
  }
135
143
  },
@@ -141,12 +149,17 @@ JSClass("JSUserDefaults", JSObject, {
141
149
  return this.valueForKey(key);
142
150
  },
143
151
  set: function JSUserDefaults_setValue(value){
152
+ this.willChangeValueForKey(key);
144
153
  this.setValueForKey(value, key);
154
+ this.didChangeValueForKey(key);
145
155
  }
146
156
  });
147
157
  }
148
158
  },
149
159
 
160
+ defineObservablePropertyForKey: function(){
161
+ },
162
+
150
163
  // MARK: - Saving to Persistent Storage
151
164
 
152
165
  _persistScheduled: false,
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ImageKit
3
- JSBundleVersion: 2022.9.0
3
+ JSBundleVersion: 2022.22.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: 2022.9.0
3
+ JSBundleVersion: 2022.22.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: 2022.9.0
3
+ JSBundleVersion: 2022.22.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: 2022.9.0
3
+ JSBundleVersion: 2022.22.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: 2022.9.0
3
+ JSBundleVersion: 2022.22.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: 2022.9.0
3
+ JSBundleVersion: 2022.22.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: 2022.9.0
3
+ JSBundleVersion: 2022.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |