@breakside/jskit 2026.26.0 → 2026.27.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 (42) 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/JSAttributedString.js +43 -0
  7. package/Frameworks/Foundation.jsframework/JS/JSPath.js +2 -0
  8. package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
  9. package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
  10. package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
  11. package/Info.json +2 -2
  12. package/Node/io.breakside.jskit-bundle.js +2 -2
  13. package/Root/Frameworks/APIKit/Info.yaml +1 -1
  14. package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
  15. package/Root/Frameworks/AuthKit/Info.yaml +1 -1
  16. package/Root/Frameworks/CSSOM/CSSTokenizer.js +633 -470
  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/JSAttributedString.js +43 -0
  26. package/Root/Frameworks/Foundation/JSPath.js +2 -0
  27. package/Root/Frameworks/ImageKit/Info.yaml +1 -1
  28. package/Root/Frameworks/MediaKit/Info.yaml +1 -1
  29. package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
  30. package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
  31. package/Root/Frameworks/PDFKit/Info.yaml +1 -1
  32. package/Root/Frameworks/QRKit/Info.yaml +1 -1
  33. package/Root/Frameworks/SearchKit/Info.yaml +1 -1
  34. package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
  35. package/Root/Frameworks/ServerKit/Info.yaml +1 -1
  36. package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
  37. package/Root/Frameworks/TestKit/Info.yaml +1 -1
  38. package/Root/Frameworks/UIKit/Info.yaml +1 -1
  39. package/Root/Frameworks/UIKit/UITextEditor.js +17 -0
  40. package/Root/Frameworks/UIKit/UITextField.js +7 -0
  41. package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
  42. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.CSSOM
3
- JSBundleVersion: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -395,6 +395,49 @@ JSClass("JSAttributedString", JSObject, {
395
395
  this._fixParagraphAttributesAtIndex(range.location + attributedString.string.length);
396
396
  },
397
397
 
398
+ stringWithFallbackFonts: function(fallbackFontDescriptors, defaultFont, usedDescriptors){
399
+ var attributedString = this;
400
+ var runIterator = attributedString.runIterator();
401
+ var unicodeIterator;
402
+ var end = attributedString.string.length;
403
+ var font;
404
+ var glyph;
405
+ var descriptor;
406
+ var i, l;
407
+ var descriptorFonts = [];
408
+ for (i = 0, l = fallbackFontDescriptors.length; i < l; ++i){
409
+ descriptorFonts.push({});
410
+ }
411
+ for (; runIterator.range.location < end; runIterator.increment()){
412
+ font = runIterator.attributes.font || defaultFont;
413
+ unicodeIterator = attributedString.string.unicodeIterator(0);
414
+ for (; unicodeIterator.character !== null; unicodeIterator.increment()){
415
+ glyph = font.glyphForCharacter(unicodeIterator.character);
416
+ if (glyph === 0){
417
+ for (i = 0, l = fallbackFontDescriptors.length && glyph === 0; i < l; ++i){
418
+ descriptor = fallbackFontDescriptors[i];
419
+ glyph = descriptor.glyphForCharacter(unicodeIterator.character);
420
+ if (glyph !== 0){
421
+ if (usedDescriptors !== undefined){
422
+ if (usedDescriptors.indexOf(descriptor) < 0){
423
+ usedDescriptors.push(descriptor);
424
+ }
425
+ }
426
+ if (attributedString === this){
427
+ attributedString = JSAttributedString.initWithAttributedString(attributedString);
428
+ }
429
+ if (descriptorFonts[i][font.pointSize] === undefined){
430
+ descriptorFonts[i][font.pointSize] = JSFont.initWithDescriptor(descriptor, font.pointSize);
431
+ }
432
+ attributedString.addAttributeInRange("font", descriptorFonts[i][font.pointSize], JSRange(unicodeIterator.index, unicodeIterator.nextIndex - unicodeIterator.index));
433
+ }
434
+ }
435
+ }
436
+ }
437
+ }
438
+ return attributedString;
439
+ },
440
+
398
441
  // MARK: - Attribute mutations
399
442
 
400
443
  setAttributesInRange: function(attributes, range){
@@ -1188,6 +1188,8 @@ JSClass("JSPath", JSObject, {
1188
1188
  if (
1189
1189
  c === "M" || c === "m" ||
1190
1190
  c === "L" || c === "l" ||
1191
+ c === "H" || c === "h" ||
1192
+ c === "V" || c === "v" ||
1191
1193
  c === "C" || c === "c" ||
1192
1194
  c === "S" || c === "s" ||
1193
1195
  c === "Z" || c === "z" ||
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ImageKit
3
- JSBundleVersion: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.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: 2026.26.0
3
+ JSBundleVersion: 2026.27.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -44,6 +44,7 @@ JSClass("UITextEditor", JSObject, {
44
44
  _selectionHighlightColor: null,
45
45
  _draggingSelectionIndex: null,
46
46
  _showsSelectionWhenNotFirstResponder: false,
47
+ _fallbackFontDescriptors: null,
47
48
 
48
49
  initWithTextLayer: function(textLayer){
49
50
  this.layoutLayer = textLayer;
@@ -809,14 +810,27 @@ JSClass("UITextEditor", JSObject, {
809
810
  this.undoManager.setActionName("Typing");
810
811
  },
811
812
 
813
+ _usedFallbackFontDescriptors: false,
814
+
812
815
  _replaceTextStorageRangeAllowingUndo: function(textStorage, range, attributedString){
813
816
  var replacedString = null;
814
817
  var insertedLength = 0;
815
818
  if (range.length > 0){
816
819
  replacedString = textStorage.attributedSubstringInRange(range);
817
820
  }
821
+ this._usedFallbackFontDescriptors = false;
818
822
  if (attributedString !== null){
819
823
  insertedLength = attributedString.string.length;
824
+ if (this._fallbackFontDescriptors !== null && insertedLength > 0){
825
+ var usedDescriptors = [];
826
+ attributedString = attributedString.stringWithFallbackFonts(this._fallbackFontDescriptors, this.layoutLayer.font, usedDescriptors);
827
+ if (usedDescriptors.length > 0){
828
+ this._usedFallbackFontDescriptors = true;
829
+ if (this.delegate && this.delegate.textEditorDidUseFallbackFontDescriptors){
830
+ this.delegate.textEditorDidUseFallbackFontDescriptors(this, usedDescriptors);
831
+ }
832
+ }
833
+ }
820
834
  }
821
835
  this.undoManager.registerUndo(this, this._replaceTextStorageRangeAllowingUndo, textStorage, JSRange(range.location, insertedLength), replacedString);
822
836
  this._isHandlingSelectionAdjustments = true;
@@ -922,6 +936,9 @@ JSClass("UITextEditor", JSObject, {
922
936
  this._replaceTextStorageRangeAllowingUndo(textStorage, adjustedRange, JSAttributedString.initWithString(text, insertAttributes));
923
937
  selection.range = JSRange(adjustedRange.location + textLength, 0);
924
938
  selection.affinity = UITextInput.SelectionAffinity.beforeCurrentCharacter;
939
+ if (this._usedFallbackFontDescriptors){
940
+ selection.attributes = insertAttributes;
941
+ }
925
942
  locationAdjustment += textLength - adjustedRange.length;
926
943
  }
927
944
  this._setSelectionsAllowingUndo(selections);
@@ -332,6 +332,13 @@ JSClass("UITextField", UIControl, {
332
332
  return this._localEditor.cursorColor;
333
333
  },
334
334
 
335
+ addFallbackFontDescriptor: function(fontDescriptor){
336
+ if (this._localEditor._fallbackFontDescriptors === null){
337
+ this._localEditor._fallbackFontDescriptors = [];
338
+ }
339
+ this._localEditor._fallbackFontDescriptors.push(fontDescriptor);
340
+ },
341
+
335
342
  // --------------------------------------------------------------------
336
343
  // MARK: - Undo Manager
337
344
 
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.UIKitTesting
3
- JSBundleVersion: 2026.26.0
3
+ JSBundleVersion: 2026.27.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "node": ">=10.10.0"
13
13
  },
14
14
  "name": "@breakside/jskit",
15
- "version": "2026.26.0",
15
+ "version": "2026.27.0",
16
16
  "license": "SEE LICENSE IN LICENSE.txt",
17
17
  "files": [
18
18
  "*"