@breakside/jskit 2023.11.0 → 2023.12.1

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 (46) 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/JSFileManager+HTML.js +111 -48
  7. package/Frameworks/Foundation.jsframework/JS/JSFileManager+Node.js +8 -1
  8. package/Frameworks/Foundation.jsframework/JS/JSUserDefaults.js +0 -1
  9. package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
  10. package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
  11. package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
  12. package/Info.json +2 -2
  13. package/Node/io.breakside.jskit-bundle.js +2 -2
  14. package/Root/Frameworks/APIKit/Info.yaml +1 -1
  15. package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
  16. package/Root/Frameworks/AuthKit/Info.yaml +1 -1
  17. package/Root/Frameworks/CSSOM/Info.yaml +1 -1
  18. package/Root/Frameworks/ChartKit/Info.yaml +1 -1
  19. package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
  20. package/Root/Frameworks/DBKit/Info.yaml +1 -1
  21. package/Root/Frameworks/DOM/Info.yaml +1 -1
  22. package/Root/Frameworks/Dispatch/Info.yaml +1 -1
  23. package/Root/Frameworks/FontKit/Info.yaml +1 -1
  24. package/Root/Frameworks/Foundation/Info.yaml +1 -1
  25. package/Root/Frameworks/Foundation/JSFileManager+HTML.js +111 -48
  26. package/Root/Frameworks/Foundation/JSFileManager+Node.js +8 -1
  27. package/Root/Frameworks/Foundation/JSUserDefaults.js +0 -1
  28. package/Root/Frameworks/ImageKit/Info.yaml +1 -1
  29. package/Root/Frameworks/MediaKit/Info.yaml +1 -1
  30. package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
  31. package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
  32. package/Root/Frameworks/PDFKit/Info.yaml +1 -1
  33. package/Root/Frameworks/QRKit/Info.yaml +1 -1
  34. package/Root/Frameworks/SearchKit/Info.yaml +1 -1
  35. package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
  36. package/Root/Frameworks/ServerKit/Info.yaml +1 -1
  37. package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
  38. package/Root/Frameworks/TestKit/Info.yaml +1 -1
  39. package/Root/Frameworks/UIKit/Info.yaml +1 -1
  40. package/Root/Frameworks/UIKit/UIAccessibility.js +2 -1
  41. package/Root/Frameworks/UIKit/UIHTMLWindowServer.js +18 -2
  42. package/Root/Frameworks/UIKit/UITextLayer.js +1 -1
  43. package/Root/Frameworks/UIKit/UIView.js +1 -0
  44. package/Root/Frameworks/UIKit/UIWindow.js +2 -4
  45. package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
  46. package/package.json +1 -1
@@ -857,6 +857,7 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
857
857
  UIHTMLWindowServer.$super.orderWindowFront.call(this, window);
858
858
  if (window.subviewIndex === 0){
859
859
  this.updateThemeColorElement();
860
+ this.updateDocumentTitle();
860
861
  }
861
862
  },
862
863
 
@@ -868,6 +869,9 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
868
869
  this.updateThemeColorElement();
869
870
  },
870
871
 
872
+ // --------------------------------------------------------------------
873
+ // MARK: - HTML Document/Window
874
+
871
875
  updateThemeColorElement: function(){
872
876
  if (this.themeColorElement === null){
873
877
  return;
@@ -896,6 +900,15 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
896
900
  this.themeColorElement.setAttribute("content", color.cssString());
897
901
  },
898
902
 
903
+ updateDocumentTitle: function(){
904
+ var window = this.windowStack[0];
905
+ if (window instanceof UIRootWindow){
906
+ if (this.rootElement === this.domDocument.body){
907
+ this.domDocument.title = window.title;
908
+ }
909
+ }
910
+ },
911
+
899
912
  // --------------------------------------------------------------------
900
913
  // MARK: - Screen Updates
901
914
 
@@ -921,7 +934,7 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
921
934
  this.accessibilityObservers = {};
922
935
  this.accessibilityObservers.elementCreated = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.elementCreated, null, this.handleAccessibilityElementCreated, this);
923
936
  this.accessibilityObservers.elementChanged = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.elementChanged, null, this.handleAccessibilityElementChanged, this);
924
- this.accessibilityObservers.titleChanged = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.titleChanged, null, this.handleAccessibilityTitleChanged, this);
937
+ this.accessibilityObservers.labelChanged = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.labelChanged, null, this.handleAccessibilityLabelChanged, this);
925
938
  this.accessibilityObservers.valueChanged = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.valueChanged, null, this.handleAccessibilityValueChanged, this);
926
939
  this.accessibilityObservers.visibilityChanged = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.visibilityChanged, null, this.handleAccessibilityVisibilityChanged, this);
927
940
  this.accessibilityObservers.enabledChanged = this.accessibilityNotificationCenter.addObserver(UIAccessibility.Notification.enabledChanged, null, this.handleAccessibilityEnabledChanged, this);
@@ -977,12 +990,15 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
977
990
  }
978
991
  },
979
992
 
980
- handleAccessibilityTitleChanged: function(notification){
993
+ handleAccessibilityLabelChanged: function(notification){
981
994
  var element = notification.sender;
982
995
  var context = this.contextForAccessibilityElement(element);
983
996
  if (context !== null){
984
997
  context.updateAccessibilityLabel(element);
985
998
  }
999
+ if (element instanceof UIRootWindow){
1000
+ this.updateDocumentTitle();
1001
+ }
986
1002
  },
987
1003
 
988
1004
  handleAccessibilityValueChanged: function(notification){
@@ -201,7 +201,7 @@ JSClass("UITextLayer", UILayer, {
201
201
  this._displayQueued = false;
202
202
  },
203
203
 
204
- integerSizeRequired: false,
204
+ integerSizeRequired: true,
205
205
 
206
206
  sizeToFitSize: function(maxSize){
207
207
  var size = JSSize(maxSize);
@@ -1161,6 +1161,7 @@ JSClass('UIView', UIResponder, {
1161
1161
 
1162
1162
  setAccessibilityLabel: function(accessibilityLabel){
1163
1163
  this._accessibilityLabel = accessibilityLabel;
1164
+ this.postAccessibilityNotification(UIAccessibility.Notification.labelChanged);
1164
1165
  },
1165
1166
 
1166
1167
  setAccessibilityHidden: function(accessibilityHidden){
@@ -157,6 +157,7 @@ JSClass('UIWindow', UIView, {
157
157
  this._title = title;
158
158
  this.setNeedsLayout();
159
159
  this._styler.updateWindow(this);
160
+ this.postAccessibilityNotification(UIAccessibility.Notification.labelChanged);
160
161
  },
161
162
 
162
163
  setIcon: function(icon){
@@ -1235,13 +1236,10 @@ JSClass("UIRootWindow", UIWindow, {
1235
1236
 
1236
1237
  level: UIWindow.Level.back,
1237
1238
 
1238
- getAccessibilityLabel: function(){
1239
- return this.application.accessibilityLabel;
1240
- },
1241
-
1242
1239
  _commonWindowInit: function(){
1243
1240
  UIRootWindow.$super._commonWindowInit.call(this);
1244
1241
  this.frame = this.application.windowServer.screen.frame;
1242
+ this.title = this.application.bundle.localizedStringForInfoKey("UIApplicationTitle");
1245
1243
  },
1246
1244
 
1247
1245
  isAccessibilityElement: false,
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.UIKitTesting
3
- JSBundleVersion: 2023.11.0
3
+ JSBundleVersion: 2023.12.1
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.11.0",
12
+ "version": "2023.12.1",
13
13
  "license": "SEE LICENSE IN LICENSE.txt",
14
14
  "files": [
15
15
  "*"