@breakside/jskit 2023.53.0 → 2024.5.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 (41) 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/io.breakside.JSKit.Foundation-bundle.js +2 -2
  7. package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
  8. package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
  9. package/Info.json +2 -2
  10. package/Node/JavascriptFile.js +17 -1
  11. package/Node/io.breakside.jskit-bundle.js +2 -2
  12. package/Root/Frameworks/APIKit/Info.yaml +1 -1
  13. package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
  14. package/Root/Frameworks/AuthKit/Info.yaml +1 -1
  15. package/Root/Frameworks/CSSOM/Info.yaml +1 -1
  16. package/Root/Frameworks/ChartKit/Info.yaml +1 -1
  17. package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
  18. package/Root/Frameworks/DBKit/Info.yaml +1 -1
  19. package/Root/Frameworks/DOM/Info.yaml +1 -1
  20. package/Root/Frameworks/Dispatch/Info.yaml +1 -1
  21. package/Root/Frameworks/FontKit/Info.yaml +1 -1
  22. package/Root/Frameworks/Foundation/Info.yaml +1 -1
  23. package/Root/Frameworks/ImageKit/Info.yaml +1 -1
  24. package/Root/Frameworks/MediaKit/Info.yaml +1 -1
  25. package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
  26. package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
  27. package/Root/Frameworks/NotificationKit/NKHTMLUserNotificationCenter.js +92 -1
  28. package/Root/Frameworks/NotificationKit/NKUserNotificationCenter.js +8 -1
  29. package/Root/Frameworks/PDFKit/Info.yaml +1 -1
  30. package/Root/Frameworks/QRKit/Info.yaml +1 -1
  31. package/Root/Frameworks/SearchKit/Info.yaml +1 -1
  32. package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
  33. package/Root/Frameworks/ServerKit/Info.yaml +1 -1
  34. package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
  35. package/Root/Frameworks/TestKit/Info.yaml +1 -1
  36. package/Root/Frameworks/UIKit/Info.yaml +1 -1
  37. package/Root/Frameworks/UIKit/UIHTMLWindowServer.js +17 -11
  38. package/Root/Frameworks/UIKit/UIPopupButton.js +13 -0
  39. package/Root/Frameworks/UIKit/UIRadioGroup.js +32 -2
  40. package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
  41. 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.53.0",
4
+ "JSBundleVersion": "2024.5.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
12
+ "GitRevision": "27bc44a0baba9849d46ec9d6cb00a43dd302acf9"
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.53.0",
6
+ "JSBundleVersion": "2024.5.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
14
+ "GitRevision": "27bc44a0baba9849d46ec9d6cb00a43dd302acf9"
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.53.0",
4
+ "JSBundleVersion": "2024.5.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
11
+ "GitRevision": "27bc44a0baba9849d46ec9d6cb00a43dd302acf9"
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.53.0",
6
+ "JSBundleVersion": "2024.5.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
13
+ "GitRevision": "27bc44a0baba9849d46ec9d6cb00a43dd302acf9"
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.53.0",
4
+ "JSBundleVersion": "2024.5.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
12
+ "GitRevision": "27bc44a0baba9849d46ec9d6cb00a43dd302acf9"
13
13
  }
@@ -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.53.0",
6
+ "JSBundleVersion": "2024.5.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
14
+ "GitRevision": "27bc44a0baba9849d46ec9d6cb00a43dd302acf9"
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.53.0",
4
+ "JSBundleVersion": "2024.5.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
12
+ "GitRevision": "27bc44a0baba9849d46ec9d6cb00a43dd302acf9"
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.53.0",
6
+ "JSBundleVersion": "2024.5.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
14
+ "GitRevision": "27bc44a0baba9849d46ec9d6cb00a43dd302acf9"
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.53.0",
4
+ "JSBundleVersion": "2024.5.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
11
+ "GitRevision": "27bc44a0baba9849d46ec9d6cb00a43dd302acf9"
12
12
  }
@@ -69,9 +69,25 @@ JSClass("JavascriptFile", JSObject, {
69
69
  if (version >= 6){
70
70
  imports.features.push('eval("const x = 1;") === undefined');
71
71
  imports.features.push('eval("let x = 1;") === undefined');
72
- imports.features.push('eval("let x = {x: async function(){}}") === undefined');
73
72
  imports.features.push('eval("x => x")');
74
73
  }
74
+ if (version >= 8){
75
+ imports.features.push('eval("let x = {x: async function(){}}") === undefined');
76
+ }
77
+ if (version >= 9){
78
+ imports.features.push('eval("let x = {a: 1}; let y = {...x};") === undefined');
79
+ }
80
+ if (version >= 11){
81
+ imports.features.push('eval("null ?? 12") === 12');
82
+ imports.features.push('eval("let x = null; x?.a") === undefined');
83
+ }
84
+ if (version >= 12){
85
+ imports.features.push('eval("1_000") === 1000');
86
+ }
87
+ if (version >= 13){
88
+ imports.features.push('eval("class x{ y; }") === undefined');
89
+ imports.features.push('eval("class x{ #y; }") === undefined');
90
+ }
75
91
  }
76
92
  scan = this.next();
77
93
  }
@@ -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.53.0",
6
+ "JSBundleVersion": "2024.5.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
13
+ "GitRevision": "27bc44a0baba9849d46ec9d6cb00a43dd302acf9"
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.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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: 2023.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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.ImageKit
3
- JSBundleVersion: 2023.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2021 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -81,6 +81,8 @@ JSClass("NKHTMLUserNotificationCenter", NKUserNotificationCenter, {
81
81
  }, function(error){
82
82
  completion.call(target, null, error);
83
83
  });
84
+ }, function(error){
85
+ completion.call(target, null, error);
84
86
  });
85
87
  }
86
88
  return completion.promise;
@@ -115,6 +117,94 @@ JSClass("NKHTMLUserNotificationCenter", NKUserNotificationCenter, {
115
117
  }, function(error){
116
118
  completion.call(target, error);
117
119
  });
120
+ }, function(error){
121
+ completion.call(target, error);
122
+ });
123
+ }
124
+ return completion.promise;
125
+ },
126
+
127
+ getRemoteNotificationRegistration: function(completion, target){
128
+ if (!completion){
129
+ completion = Promise.completion(Promise.rejectNonNullSecondArgument);
130
+ }
131
+ var notificationCenter = this;
132
+ if (this.serviceWorkerContainer === null){
133
+ JSRunLoop.main.schedule(completion, target, null, null);
134
+ }else{
135
+ this.serviceWorkerContainer.getRegistration().then(function(serviceWorkerRegistration){
136
+ if (!serviceWorkerRegistration){
137
+ completion.call(target, null, null);
138
+ return;
139
+ }
140
+ if (!serviceWorkerRegistration.pushManager){
141
+ completion.call(target, null, null);
142
+ return;
143
+ }
144
+ serviceWorkerRegistration.pushManager.getSubscription().then(function(subscription){
145
+ if (subscription){
146
+ var registration = {
147
+ type: NKUserNotificationCenter.RegistrationType.web,
148
+ options: {
149
+ applicationServerJWK: notificationCenter.webPushApplicationServerJWK,
150
+ },
151
+ subscription: {
152
+ endpoint: subscription.endpoint,
153
+ expirationTime: subscription.expirationTime,
154
+ keys: {
155
+ p256dh: JSData.initWithBuffer(subscription.getKey("p256dh")).base64URLStringRepresentation(),
156
+ auth: JSData.initWithBuffer(subscription.getKey("auth")).base64URLStringRepresentation()
157
+ },
158
+ }
159
+ };
160
+ completion.call(target, registration, null);
161
+ }else{
162
+ completion.call(target, null, null);
163
+ }
164
+ }, function(error){
165
+ completion.call(target, null, error);
166
+ });
167
+ }, function(error){
168
+ completion.call(target, null, error);
169
+ });
170
+ }
171
+ return completion.promise;
172
+ },
173
+
174
+ getRemoteNotificationAuthorizationStatus: function(completion, target){
175
+ if (!completion){
176
+ completion = Promise.completion();
177
+ }
178
+ var notificationCenter = this;
179
+ if (this.serviceWorkerContainer === null){
180
+ JSRunLoop.main.schedule(completion, target, NKUserNotificationCenter.AuthorizationStatus.unavailable);
181
+ }else{
182
+ this.serviceWorkerContainer.getRegistration().then(function(serviceWorkerRegistration){
183
+ if (!serviceWorkerRegistration){
184
+ completion.call(target, NKUserNotificationCenter.AuthorizationStatus.unavailable);
185
+ return;
186
+ }
187
+ if (!serviceWorkerRegistration.pushManager){
188
+ completion.call(target, NKUserNotificationCenter.AuthorizationStatus.unavailable);
189
+ return;
190
+ }
191
+ var options = {
192
+ userVisibleOnly: true
193
+ };
194
+ if (notificationCenter.webPushApplicationServerJWK){
195
+ options.applicationServerKey = JSData.initWithChunks([
196
+ JSData.initWithArray([0x04]),
197
+ notificationCenter.webPushApplicationServerJWK.x.dataByDecodingBase64URL(),
198
+ notificationCenter.webPushApplicationServerJWK.y.dataByDecodingBase64URL()
199
+ ]).base64URLStringRepresentation();
200
+ }
201
+ serviceWorkerRegistration.pushManager.permissionState(options).then(function(permissionState){
202
+ completion.call(target, statusByPermission[permissionState]);
203
+ }, function(error){
204
+ completion.call(target, NKUserNotificationCenter.AuthorizationStatus.unknown);
205
+ });
206
+ }, function(error){
207
+ completion.call(target, NKUserNotificationCenter.AuthorizationStatus.unknown);
118
208
  });
119
209
  }
120
210
  return completion.promise;
@@ -220,7 +310,7 @@ JSClass("NKHTMLUserNotificationCenter", NKUserNotificationCenter, {
220
310
  if (!completion){
221
311
  completion = Promise.completion();
222
312
  }
223
- var status = NKUserNotificationCenter.AuthorizationStatus.denied;
313
+ var status = NKUserNotificationCenter.AuthorizationStatus.unavailable;
224
314
  if (this.supportsHTMLNotifications){
225
315
  status = statusByPermission[Notification.permission];
226
316
  }
@@ -259,6 +349,7 @@ JSClass("NKHTMLUserNotificationCenter", NKUserNotificationCenter, {
259
349
 
260
350
  var statusByPermission = {
261
351
  "default": NKUserNotificationCenter.AuthorizationStatus.unknown,
352
+ "prompt": NKUserNotificationCenter.AuthorizationStatus.unknown,
262
353
  "granted": NKUserNotificationCenter.AuthorizationStatus.authorized,
263
354
  "denied": NKUserNotificationCenter.AuthorizationStatus.denied,
264
355
  };
@@ -39,6 +39,12 @@ JSClass("NKUserNotificationCenter", JSObject, {
39
39
  unregisterForRemoteNotifications: function(completion, target){
40
40
  },
41
41
 
42
+ getRemoteNotificationRegistration: function(completion, target){
43
+ },
44
+
45
+ getRemoteNotificationAuthorizationStatus: function(completion, target){
46
+ },
47
+
42
48
  addNotification: function(notification, date){
43
49
  },
44
50
 
@@ -54,7 +60,8 @@ JSClass("NKUserNotificationCenter", JSObject, {
54
60
  NKUserNotificationCenter.AuthorizationStatus = {
55
61
  unknown: 0,
56
62
  authorized: 1,
57
- denied: 2
63
+ denied: 2,
64
+ unavailable: 3,
58
65
  };
59
66
 
60
67
  NKUserNotificationCenter.RegistrationType = {
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.PDFKit
3
- JSBundleVersion: 2023.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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.53.0
3
+ JSBundleVersion: 2024.5.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: 2023.53.0
3
+ JSBundleVersion: 2024.5.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -559,26 +559,32 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
559
559
  dragover: function(e){
560
560
  // prevent the default dragover behavior so our custom drag and drop can work
561
561
  e.preventDefault();
562
- if (this._dragingSessionStartedOutsideBrowser){
563
- this._draggingSession.pasteboard.dataTransfer = e.dataTransfer;
562
+ if (this._draggingSession !== null){
563
+ if (this._dragingSessionStartedOutsideBrowser){
564
+ this._draggingSession.pasteboard.dataTransfer = e.dataTransfer;
565
+ }
564
566
  }
565
567
  this._updateMouseLocation(e);
566
568
  this.mouseDidMove(e.timeStamp / 1000.0, 0);
567
- e.dataTransfer.dropEffect = DragOperationToDropEffect[this._draggingSession.operation] || 'none';
569
+ if (this._draggingSession !== null){
570
+ e.dataTransfer.dropEffect = DragOperationToDropEffect[this._draggingSession.operation] || 'none';
571
+ }
568
572
  },
569
573
 
570
574
  drop: function(e){
571
575
  // prevent the default drop behavior so our custom drag and drop can work
572
576
  e.preventDefault();
573
577
  this._updateMouseLocation(e);
574
- if (this._dragingSessionStartedOutsideBrowser){
575
- // The original dataTransfer object from dragenter doesn't have readable files for security reasons
576
- // so we need to update the pasteboard with the new dataTransfer object, which has readable files
577
- // NOTE: It's safe to overwrite the entire pasteboard if we started with an HTMLDataTransferPasteboard,
578
- // which must have originated from outside the browser, because it cannot contain custom data.
579
- this._draggingSession.pasteboard.dataTransfer = e.dataTransfer;
580
- }
581
- this.draggingSessionDidPerformOperation();
578
+ if (this._draggingSession !== null){
579
+ if (this._dragingSessionStartedOutsideBrowser){
580
+ // The original dataTransfer object from dragenter doesn't have readable files for security reasons
581
+ // so we need to update the pasteboard with the new dataTransfer object, which has readable files
582
+ // NOTE: It's safe to overwrite the entire pasteboard if we started with an HTMLDataTransferPasteboard,
583
+ // which must have originated from outside the browser, because it cannot contain custom data.
584
+ this._draggingSession.pasteboard.dataTransfer = e.dataTransfer;
585
+ }
586
+ this.draggingSessionDidPerformOperation();
587
+ }
582
588
  },
583
589
 
584
590
  // --------------------------------------------------------------------
@@ -450,6 +450,7 @@ UIPopupButton.Styler = Object.create({}, {
450
450
  JSClass("UIPopupButtonStyler", UIControlStyler, {
451
451
 
452
452
  menuStyler: null,
453
+ font: null,
453
454
 
454
455
  init: function(){
455
456
  this.menuStyler = UIMenu.Styler.default;
@@ -462,6 +463,16 @@ JSClass("UIPopupButtonStyler", UIControlStyler, {
462
463
  }else{
463
464
  this.menuStyler = UIMenu.Styler.default;
464
465
  }
466
+ if (spec.containsKey("font")){
467
+ this.font = spec.valueForKey("font", JSFont);
468
+ }
469
+ },
470
+
471
+ initializeControl: function(button){
472
+ UIPopupButtonStyler.$super.initializeControl.call(this, button);
473
+ if (this.font !== null){
474
+ button._titleLabel.font = this.font;
475
+ }
465
476
  }
466
477
 
467
478
  });
@@ -633,6 +644,7 @@ JSClass("UIPopupButtonCustomStyler", UIPopupButtonStyler, {
633
644
  },
634
645
 
635
646
  initializeControl: function(button){
647
+ UIPopupButtonCustomStyler.$super.initializeControl.call(this, button);
636
648
  button.titleInsets = this.titleInsets;
637
649
  button.layer.borderWidth = this.borderWidth;
638
650
  button.layer.cornerRadius = this.cornerRadius;
@@ -854,6 +866,7 @@ JSClass("UIPopupButtonImageStyler", UIPopupButtonStyler, {
854
866
  },
855
867
 
856
868
  initializeControl: function(button){
869
+ UIPopupButtonImageStyler.$super.initializeControl.call(this, button);
857
870
  button._imageView.automaticRenderMode = JSImage.RenderMode.template;
858
871
  button._titleLabel.hidden = true;
859
872
  button._indicatorView.hidden = true;
@@ -95,7 +95,7 @@ JSClass("UIRadioGroup", UIControl, {
95
95
 
96
96
  setEnabled: function(isEnabled){
97
97
  if (isEnabled !== this.enabled){
98
- this.enabled = isEnabled;
98
+ UIRadioGroup.$super.setEnabled.call(this, isEnabled);
99
99
  for (var i = 0, l = this.buttons.length; i < l; ++i){
100
100
  this.buttons[i].enabled = isEnabled;
101
101
  }
@@ -108,6 +108,20 @@ JSClass("UIRadioGroup", UIControl, {
108
108
 
109
109
  getAccessibilityElements: function(){
110
110
  return this.buttons;
111
+ },
112
+
113
+ getFirstBaselineOffsetFromTop: function(){
114
+ if (this.buttons.length > 0){
115
+ return this.buttons[0].firstBaselineOffsetFromTop;
116
+ }
117
+ return 0;
118
+ },
119
+
120
+ getLastBaselineOffsetFromBottom: function(){
121
+ if (this.buttons.length > 0){
122
+ return this.buttons[this.buttons.length - 1].lastBaselineOffsetFromBottom;
123
+ }
124
+ return 0;
111
125
  }
112
126
 
113
127
  });
@@ -317,7 +331,23 @@ JSClass("UIRadioButton", UIControl, {
317
331
  return this._titleLabel.text;
318
332
  }
319
333
  return null;
320
- }
334
+ },
335
+
336
+ getFirstBaselineOffsetFromTop: function(){
337
+ if (this._titleLabel !== null){
338
+ this.layoutIfNeeded();
339
+ return this.convertPointFromView(JSPoint(0, this._titleLabel.firstBaselineOffsetFromTop), this._titleLabel).y;
340
+ }
341
+ return this.bounds.size.height;
342
+ },
343
+
344
+ getLastBaselineOffsetFromBottom: function(){
345
+ if (this._titleLabel !== null){
346
+ this.layoutIfNeeded();
347
+ return this.convertPointFromView(JSPoint(0, this._titleLabel.lastBaselineOffsetFromBottom), this._titleLabel).y;
348
+ }
349
+ return 0;
350
+ },
321
351
 
322
352
  });
323
353
 
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.UIKitTesting
3
- JSBundleVersion: 2023.53.0
3
+ JSBundleVersion: 2024.5.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.53.0",
12
+ "version": "2024.5.0",
13
13
  "license": "SEE LICENSE IN LICENSE.txt",
14
14
  "files": [
15
15
  "*"