@breakside/jskit 2022.23.0 → 2022.25.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 (94) 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 +139 -10
  7. package/Frameworks/Foundation.jsframework/JS/JSFileManager+Node.js +2 -2
  8. package/Frameworks/Foundation.jsframework/JS/JSParagraphStyle.js +71 -0
  9. package/Frameworks/Foundation.jsframework/JS/JSTextAttachment.js +1 -1
  10. package/Frameworks/Foundation.jsframework/JS/JSTextContainer.js +56 -29
  11. package/Frameworks/Foundation.jsframework/JS/JSTextFrame.js +2 -32
  12. package/Frameworks/Foundation.jsframework/JS/JSTextFramesetter.js +125 -22
  13. package/Frameworks/Foundation.jsframework/JS/JSTextLayoutManager.js +11 -3
  14. package/Frameworks/Foundation.jsframework/JS/JSTextLine.js +4 -3
  15. package/Frameworks/Foundation.jsframework/JS/JSTextRun.js +5 -3
  16. package/Frameworks/Foundation.jsframework/JS/JSTextTypesetter.js +41 -25
  17. package/Frameworks/Foundation.jsframework/JS/JSURL.js +3 -0
  18. package/Frameworks/Foundation.jsframework/JS/JSZip.js +97 -76
  19. package/Frameworks/Foundation.jsframework/JS/String+JS.js +35 -0
  20. package/Frameworks/Foundation.jsframework/JS/UnicodeChar.js +8 -0
  21. package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
  22. package/Frameworks/Foundation.jsframework/sources.json +3 -0
  23. package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
  24. package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
  25. package/Info.json +2 -2
  26. package/Node/io.breakside.jskit-bundle.js +2 -2
  27. package/Node/jskit +1 -0
  28. package/Root/Frameworks/APIKit/Info.yaml +1 -1
  29. package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
  30. package/Root/Frameworks/AuthKit/Info.yaml +1 -1
  31. package/Root/Frameworks/CSSOM/Info.yaml +1 -1
  32. package/Root/Frameworks/ChartKit/CHAxis.js +5 -5
  33. package/Root/Frameworks/ChartKit/CHPieChart.js +1 -1
  34. package/Root/Frameworks/ChartKit/Info.yaml +1 -1
  35. package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
  36. package/Root/Frameworks/DBKit/Info.yaml +1 -1
  37. package/Root/Frameworks/DOM/Info.yaml +1 -1
  38. package/Root/Frameworks/Dispatch/Info.yaml +1 -1
  39. package/Root/Frameworks/FontKit/Info.yaml +1 -1
  40. package/Root/Frameworks/Foundation/Info.yaml +1 -1
  41. package/Root/Frameworks/Foundation/JSAttributedString.js +139 -10
  42. package/Root/Frameworks/Foundation/JSFileManager+Node.js +2 -2
  43. package/Root/Frameworks/Foundation/JSParagraphStyle.js +71 -0
  44. package/Root/Frameworks/Foundation/JSTextAttachment.js +1 -1
  45. package/Root/Frameworks/Foundation/JSTextContainer.js +56 -29
  46. package/Root/Frameworks/Foundation/JSTextFrame.js +2 -32
  47. package/Root/Frameworks/Foundation/JSTextFramesetter.js +125 -22
  48. package/Root/Frameworks/Foundation/JSTextLayoutManager.js +11 -3
  49. package/Root/Frameworks/Foundation/JSTextLine.js +4 -3
  50. package/Root/Frameworks/Foundation/JSTextRun.js +5 -3
  51. package/Root/Frameworks/Foundation/JSTextTypesetter.js +41 -25
  52. package/Root/Frameworks/Foundation/JSURL.js +3 -0
  53. package/Root/Frameworks/Foundation/JSZip.js +97 -76
  54. package/Root/Frameworks/Foundation/String+JS.js +35 -0
  55. package/Root/Frameworks/Foundation/UnicodeChar.js +8 -0
  56. package/Root/Frameworks/ImageKit/Info.yaml +1 -1
  57. package/Root/Frameworks/MediaKit/Info.yaml +1 -1
  58. package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
  59. package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
  60. package/Root/Frameworks/PDFKit/Info.yaml +1 -1
  61. package/Root/Frameworks/QRKit/Info.yaml +1 -1
  62. package/Root/Frameworks/SearchKit/Info.yaml +1 -1
  63. package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
  64. package/Root/Frameworks/ServerKit/Info.yaml +1 -1
  65. package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
  66. package/Root/Frameworks/TestKit/Info.yaml +1 -1
  67. package/Root/Frameworks/UIKit/Info.yaml +1 -1
  68. package/Root/Frameworks/UIKit/UIBasicAnimation.js +1 -1
  69. package/Root/Frameworks/UIKit/UIHTMLApplication.js +53 -15
  70. package/Root/Frameworks/UIKit/UIHTMLContentEditableTextInputManager.js +36 -0
  71. package/Root/Frameworks/UIKit/UIHTMLDisplayServer.js +1 -1
  72. package/Root/Frameworks/UIKit/UIHTMLTextField.js +1 -1
  73. package/Root/Frameworks/UIKit/UIHTMLTextFrame.js +19 -91
  74. package/Root/Frameworks/UIKit/UIHTMLTextFramesetter.js +52 -9
  75. package/Root/Frameworks/UIKit/UIHTMLTextLine.js +95 -30
  76. package/Root/Frameworks/UIKit/UIHTMLTextRun.js +22 -9
  77. package/Root/Frameworks/UIKit/UIHTMLTextTypesetter.js +334 -459
  78. package/Root/Frameworks/UIKit/UIHTMLWindowServer.js +16 -0
  79. package/Root/Frameworks/UIKit/UIImageLayer.js +14 -7
  80. package/Root/Frameworks/UIKit/UILabel.js +2 -0
  81. package/Root/Frameworks/UIKit/UIScrollView.js +12 -0
  82. package/Root/Frameworks/UIKit/UISegmentedControl.js +6 -6
  83. package/Root/Frameworks/UIKit/UIState.js +8 -1
  84. package/Root/Frameworks/UIKit/UITextAttachmentView.js +1 -1
  85. package/Root/Frameworks/UIKit/UITextEditor.js +210 -25
  86. package/Root/Frameworks/UIKit/UITextField.js +58 -31
  87. package/Root/Frameworks/UIKit/UITextInput.js +3 -1
  88. package/Root/Frameworks/UIKit/UITextInputManager.js +2 -2
  89. package/Root/Frameworks/UIKit/UITextLayer.js +39 -26
  90. package/Root/Frameworks/UIKit/UITokenField.js +4 -4
  91. package/Root/Frameworks/UIKit/UIView.js +3 -1
  92. package/Root/Frameworks/UIKit/UIWindow.js +16 -3
  93. package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
  94. package/package.json +1 -1
@@ -1,6 +1,9 @@
1
1
  // #import "JSObject.js"
2
2
  // #import "Promise+JS.js"
3
3
  // #import "JSCRC32.js"
4
+ // #import "JSDate.js"
5
+ // #import "JSCalendar.js"
6
+ // #import "Deflate.js"
4
7
  "use strict";
5
8
 
6
9
  JSClass("JSZip", JSObject, {
@@ -14,61 +17,89 @@ JSClass("JSZip", JSObject, {
14
17
  offset: 0,
15
18
 
16
19
  addFile: function(file, completion, target){
20
+ return this.addFileInDirectory(file, "", {}, completion, target);
21
+ },
22
+
23
+ addFileInDirectory: function(file, directory, attributes, completion, target){
17
24
  if (!completion){
18
25
  completion = Promise.completion(Promise.resolveNull);
19
26
  }
27
+ if (directory.startsWith("/")){
28
+ directory = directory.substr(1);
29
+ }
30
+ if (directory.length > 1 && !directory.endsWith("/")){
31
+ directory = directory + "/";
32
+ }
20
33
  file.readData(function(data){
21
34
  if (data === null){
22
35
  completion.call(target, new Error("Failed to read file data"));
23
36
  return;
24
37
  }
25
- this.addDataForFilename(data, file.name, completion, target);
38
+ var error = null;
39
+ try{
40
+ this.addDataForFilename(data, directory + file.name, attributes);
41
+ }catch (e){
42
+ error = e;
43
+ }
44
+ completion.call(target, error);
26
45
  }, this);
27
46
  return completion.promise;
28
47
  },
29
48
 
30
- addDataForFilename: function(data, name, completion, target){
31
- if (!completion){
32
- completion = Promise.completion(Promise.resolveNull);
33
- }
34
- var error = null;
35
- try{
36
- var encodedName = name.utf8();
37
- var header = JSData.initWithLength(30 + encodedName.length);
38
- var dataView = header.dataView();
39
- var crc = JSCRC32(data);
40
- dataView.setUint32(0, 0x04034b50, true);
41
- dataView.setUint16(4, 20, true);
42
- dataView.setUint16(6, 0, true);
43
- dataView.setUint16(8, 0, true); // no compression
44
- dataView.setUint16(10, 0, true); // date
45
- dataView.setUint16(12, 0, true); // date
46
- dataView.setUint32(14, crc, true);
47
- dataView.setUint32(18, data.length, true);
48
- dataView.setUint32(22, data.length, true);
49
- dataView.setUint16(26, encodedName.length, true);
50
- dataView.setUint16(28, 0, true);
51
- encodedName.copyTo(header, 30);
52
- this.directory.push({
53
- name: name,
54
- offset: this.offset,
55
- header: header
56
- });
57
- this.addChunk(header);
58
- this.addChunk(data);
59
- }catch (e){
60
- error = e;
49
+ addDataForFilename: function(data, name, attributes, deflate){
50
+ var encodedName = name.utf8();
51
+ var header = JSData.initWithLength(30 + encodedName.length);
52
+ var dataView = header.dataView();
53
+ var crc = JSCRC32(data);
54
+ var dateComponents = JSCalendar.gregorian.componentsFromDate(JSCalendar.Unit.day | JSCalendar.Unit.month | JSCalendar.Unit.year | JSCalendar.Unit.hour | JSCalendar.Unit.minute | JSCalendar.Unit.second, attributes.updated !== undefined ? JSDate.initWithTimeIntervalSince1970(attributes.updated) : JSDate.now, JSTimeZone.local || JSTimeZone.utc);
55
+ var dosDate = ((dateComponents.year - 1980) << 9) | ((dateComponents.month) << 5) | (dateComponents.day);
56
+ var dosTime = ((dateComponents.hour) << 11) | ((dateComponents.minute) << 5) | (Math.floor(dateComponents.second / 2));
57
+ var storedData = data;
58
+ var method = 0;
59
+ if (deflate){
60
+ var stream = DeflateStream();
61
+ stream.input = data;
62
+ stream.output = JSData.initWithLength(data.length);
63
+ stream.deflate(true);
64
+ if (stream.state === DeflateStream.State.done){
65
+ storedData = stream.output.subdataInRange(JSRange(0, stream.outputOffset));
66
+ method = 8;
67
+ }
61
68
  }
62
- completion.call(target, error);
63
- return completion.promise;
69
+ // Local File Header (APPNOTE.txt 4.3.7)
70
+ // Everything is little-endian
71
+ dataView.setUint32(0, 0x04034b50, true); // signtature
72
+ dataView.setUint16(4, 0x0014, true); // version needed to extract (2.0)
73
+ dataView.setUint16(6, 0, true); // general purpose flags
74
+ dataView.setUint16(8, method, true); // compression method (0=none, 8=deflate)
75
+ dataView.setUint16(10, dosTime, true); // last modified time (MS-DOS)
76
+ dataView.setUint16(12, dosDate, true); // last modified date (MS-DOS)
77
+ dataView.setUint32(14, crc, true); // crc-32 (magic number 0xdebb20e3, preconditioned to 0xffffffff, post-conditioned by one's compliment)
78
+ dataView.setUint32(18, storedData.length, true); // compressed size
79
+ dataView.setUint32(22, data.length, true); // uncompressed size
80
+ dataView.setUint16(26, encodedName.length, true); // name length
81
+ dataView.setUint16(28, 0, true); // extra field length
82
+ encodedName.copyTo(header, 30); // name (NOT null-terminated)
83
+ this.directory.push({
84
+ name: name,
85
+ offset: this.offset,
86
+ header: header
87
+ });
88
+ this.chunks.push(header);
89
+ this.chunks.push(storedData);
90
+ this.offset += header.length + storedData.length;
91
+ this._data = null;
64
92
  },
65
93
 
66
- close: function(completion, target){
67
- if (!completion){
68
- completion = Promise.completion(Promise.resolveNull);
69
- }
70
- var error = null;
71
- try{
94
+ directory: null,
95
+
96
+ chunks: null,
97
+
98
+ data: JSReadOnlyProperty("_data", null),
99
+
100
+ getData: function(){
101
+ if (this._data === null){
102
+ var chunks = JSCopy(this.chunks);
72
103
  var i, l;
73
104
  var centralDirectoryOffset = this.offset;
74
105
  var centralDirectorySize = 0;
@@ -77,49 +108,39 @@ JSClass("JSZip", JSObject, {
77
108
  var dataView;
78
109
  var file;
79
110
  for (i = 0, l = this.directory.length; i < l; ++i){
111
+ // Central Directory File Header (APPNOTE.txt 4.3.12)
112
+ // Everything is little-endian
80
113
  file = this.directory[i];
81
114
  header = JSData.initWithLength(46 + (file.header.length - 30));
82
115
  dataView = header.dataView();
83
- dataView.setUint32(0, 0x02014b50, true);
84
- dataView.setUint16(4, 0, true);
85
- file.header.subdataInRange(JSRange(4, 26)).copyTo(header, 6);
86
- dataView.setUint16(32, 0, true);
87
- dataView.setUint16(34, 0, true);
88
- dataView.setUint16(36, 0, true);
89
- dataView.setUint32(38, 0, true);
90
- dataView.setUint32(42, file.offset, true);
91
- file.header.subdataInRange(JSRange(30, file.header.length - 30)).copyTo(header, 46);
116
+ dataView.setUint32(0, 0x02014b50, true); // signature
117
+ dataView.setUint16(4, 0x0314, true); // version made by (UNIX=3, 2.0)
118
+ file.header.subdataInRange(JSRange(4, 26)).copyTo(header, 6); // copy from local header
119
+ dataView.setUint16(32, 0, true); // commenet length
120
+ dataView.setUint16(34, 0, true); // disk number start
121
+ dataView.setUint16(36, 0, true); // internal file attributes
122
+ dataView.setUint32(38, 0, true); // external file attributes
123
+ dataView.setUint32(42, file.offset, true); // offset of local header relative to first disk
124
+ file.header.subdataInRange(JSRange(30, file.header.length - 30)).copyTo(header, 46); // name (ALWAYS forward slashes for directories)
92
125
  centralDirectorySize += header.length;
93
- this.addChunk(header);
126
+ chunks.push(header);
94
127
  }
128
+ // End of Central Directory Record (APPNOTE.txt 4.3.16)
129
+ // everything is little-endian
95
130
  var end = JSData.initWithLength(22);
96
131
  dataView = end.dataView();
97
- dataView.setUint32(0, 0x06054b50, true);
98
- dataView.setUint16(4, 0, true);
99
- dataView.setUint16(6, 0, true);
100
- dataView.setUint16(8, this.directory.length, true);
101
- dataView.setUint16(10, this.directory.length, true);
102
- dataView.setUint32(12, centralDirectorySize, true);
103
- dataView.setUint32(16, centralDirectoryOffset, true);
104
- dataView.setUint16(20, 0, true);
105
- this.addChunk(end);
106
- this._data = JSData.initWithChunks(this.chunks);
107
- }catch (e){
108
- error = e;
132
+ dataView.setUint32(0, 0x06054b50, true); // signature
133
+ dataView.setUint16(4, 0, true); // number of this disk
134
+ dataView.setUint16(6, 0, true); // number of the disk with the start of central directory
135
+ dataView.setUint16(8, this.directory.length, true); // number of central directory items on this disk
136
+ dataView.setUint16(10, this.directory.length, true); // number of central directory items total
137
+ dataView.setUint32(12, centralDirectorySize, true); // size of central directory
138
+ dataView.setUint32(16, centralDirectoryOffset, true); // offset to central directory with respect to starting disk
139
+ dataView.setUint16(20, 0, true); // zip file comemnt length
140
+ chunks.push(end);
141
+ this._data = JSData.initWithChunks(chunks);
109
142
  }
110
- completion.call(target, error);
111
- return completion.promise;
112
- },
113
-
114
- addChunk: function(chunk){
115
- this.chunks.push(chunk);
116
- this.offset += chunk.length;
117
- },
118
-
119
- directory: null,
120
-
121
- chunks: null,
122
-
123
- data: JSReadOnlyProperty("_data", null),
143
+ return this._data;
144
+ }
124
145
 
125
146
  });
@@ -244,6 +244,25 @@ Object.defineProperties(String.prototype, {
244
244
  }
245
245
  },
246
246
 
247
+ rangeForParagraphAtIndex: {
248
+ enumerable: false,
249
+ value: function String_rangeForParagraphAtIndex(index){
250
+ var iterator1 = this.userPerceivedCharacterIterator(index);
251
+ var startIndex = iterator1.range.location;
252
+ var iterator2 = UserPerceivedCharacterIterator(iterator1);
253
+ iterator1.decrement();
254
+ while (!iterator1.isParagraphBreak){
255
+ startIndex = iterator1.range.location;
256
+ iterator1.decrement();
257
+ }
258
+ while (!iterator2.isParagraphBreak){
259
+ iterator2.increment();
260
+ }
261
+ var endIndex = iterator2.range.end;
262
+ return JSRange(startIndex, endIndex - startIndex);
263
+ }
264
+ },
265
+
247
266
  // -------------------------------------------------------------------------
248
267
  // MARK: - Changing a String
249
268
 
@@ -1159,6 +1178,22 @@ Object.defineProperties(UserPerceivedCharacterIterator.prototype, {
1159
1178
  // can start with CR, we know the second character must be LF.
1160
1179
  return this._unicodeIterator.character.isLineBreak;
1161
1180
  }
1181
+ },
1182
+
1183
+ isParagraphBreak: {
1184
+ enumerable: true,
1185
+ configurable: false,
1186
+ get: function UserPerceivedCharacterIterator_isMandatoryLineBreak(){
1187
+ if (this._unicodeIterator.character === null){
1188
+ return true;
1189
+ }
1190
+ // Note that even though we're only checking the first character,
1191
+ // it will match the multi-char CRLF sequence, which is considered
1192
+ // to be a single user perceived character. In this case, only
1193
+ // the CR is checked, but since no other user perceived character
1194
+ // can start with CR, we know the second character must be LF.
1195
+ return this._unicodeIterator.character.isParagraphBreak;
1196
+ }
1162
1197
  }
1163
1198
 
1164
1199
  });
@@ -778,6 +778,14 @@ UnicodeChar.prototype = Object.create(Object.prototype, {
778
778
  Object.defineProperty(this, 'isLineBreak', {value: this.code === UnicodeChar.LineBreaks.newLine || this.code === UnicodeChar.LineBreaks.formFeed || this.code === UnicodeChar.LineBreaks.carriageReturn || this.code === UnicodeChar.LineBreaks.nextLine || this.code === UnicodeChar.LineBreaks.lineSeparator || this.code === UnicodeChar.LineBreaks.paragraphSeparator});
779
779
  return this.isLineBreak;
780
780
  }
781
+ },
782
+
783
+ isParagraphBreak: {
784
+ configurable: true,
785
+ get: function UnicodeChar_lazy_isParagraphBreak(){
786
+ Object.defineProperty(this, 'isParagraphBreak', {value: this.code === UnicodeChar.LineBreaks.newLine || this.code === UnicodeChar.LineBreaks.formFeed || this.code === UnicodeChar.LineBreaks.carriageReturn || this.code === UnicodeChar.LineBreaks.nextLine || this.code === UnicodeChar.LineBreaks.paragraphSeparator});
787
+ return this.isParagraphBreak;
788
+ }
781
789
  }
782
790
 
783
791
  });
@@ -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.23.0",
6
+ "JSBundleVersion": "2022.25.1",
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": "e2a77335b26d1a321448e73eb7b733cdd0714cc8"
14
+ "GitRevision": "2e97a8a0dcc3e1907a4ba7e8e31cd544e87cb0a4"
15
15
  },
16
16
  "Resources": [
17
17
  {
@@ -65,6 +65,7 @@
65
65
  "JSContext.js",
66
66
  "JSDateFormatter.js",
67
67
  "JSNumberFormatter.js",
68
+ "JSParagraphStyle.js",
68
69
  "JSTextLayoutManager.js",
69
70
  "JSTextRun.js",
70
71
  "JSTextLine.js",
@@ -225,9 +226,11 @@
225
226
  "JSContext",
226
227
  "JSDateFormatter",
227
228
  "JSNumberFormatter",
229
+ "JSParagraphStyle",
228
230
  "JSTextLayoutManager",
229
231
  "JSTextRun",
230
232
  "JSTextLine",
233
+ "JSTextTypesetterDelegate",
231
234
  "JSTextTypesetter",
232
235
  "JSTextFrame",
233
236
  "JSTextFramesetter",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "JSBundleType": "framework",
3
3
  "JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
4
- "JSBundleVersion": "2022.23.0",
4
+ "JSBundleVersion": "2022.25.1",
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": "e2a77335b26d1a321448e73eb7b733cdd0714cc8"
12
+ "GitRevision": "2e97a8a0dcc3e1907a4ba7e8e31cd544e87cb0a4"
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.23.0",
6
+ "JSBundleVersion": "2022.25.1",
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": "e2a77335b26d1a321448e73eb7b733cdd0714cc8"
14
+ "GitRevision": "2e97a8a0dcc3e1907a4ba7e8e31cd544e87cb0a4"
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.23.0",
4
+ "JSBundleVersion": "2022.25.1",
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": "e2a77335b26d1a321448e73eb7b733cdd0714cc8"
11
+ "GitRevision": "2e97a8a0dcc3e1907a4ba7e8e31cd544e87cb0a4"
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.23.0",
6
+ "JSBundleVersion": "2022.25.1",
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": "e2a77335b26d1a321448e73eb7b733cdd0714cc8"
13
+ "GitRevision": "2e97a8a0dcc3e1907a4ba7e8e31cd544e87cb0a4"
14
14
  },
15
15
  "Resources": [
16
16
  {
package/Node/jskit CHANGED
@@ -66,6 +66,7 @@ require("./../Frameworks/Foundation.jsframework/JS/JSPath.js");
66
66
  require("./../Frameworks/Foundation.jsframework/JS/JSContext.js");
67
67
  require("./../Frameworks/Foundation.jsframework/JS/JSDateFormatter.js");
68
68
  require("./../Frameworks/Foundation.jsframework/JS/JSNumberFormatter.js");
69
+ require("./../Frameworks/Foundation.jsframework/JS/JSParagraphStyle.js");
69
70
  require("./../Frameworks/Foundation.jsframework/JS/JSTextLayoutManager.js");
70
71
  require("./../Frameworks/Foundation.jsframework/JS/JSTextRun.js");
71
72
  require("./../Frameworks/Foundation.jsframework/JS/JSTextLine.js");
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.APIKit
3
- JSBundleVersion: 2022.23.0
3
+ JSBundleVersion: 2022.25.1
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.23.0
3
+ JSBundleVersion: 2022.25.1
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.23.0
3
+ JSBundleVersion: 2022.25.1
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.23.0
3
+ JSBundleVersion: 2022.25.1
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -178,14 +178,14 @@ JSClass("CHAxis", JSObject, {
178
178
  var labelInsets = JSInsets(this.style.labelInsets);
179
179
  var labelTextFrame;
180
180
  if (this.edge === CHAxis.Edge.leading){
181
- this.framesetter.attributes.textAlignment = JSTextAlignment.right;
181
+ this.framesetter.defaultParagraphStyle.textAlignment = JSTextAlignment.right;
182
182
  labelInsets.bottom += Math.max(this.style.lineWidth / 2, majorTickMarkLength, minorTickMarkLength);
183
183
  }else{
184
- this.framesetter.attributes.textAlignment = JSTextAlignment.left;
184
+ this.framesetter.defaultParagraphStyle.textAlignment = JSTextAlignment.left;
185
185
  labelInsets.top += Math.max(this.style.lineWidth / 2, majorTickMarkLength, minorTickMarkLength);
186
186
  }
187
187
  var labelOrigin = JSPoint(0, rect.origin.y + this.style.labelInsets.top);
188
- this.framesetter.attributes.textAlignment = JSTextAlignment.left;
188
+ this.framesetter.defaultParagraphStyle.textAlignment = JSTextAlignment.left;
189
189
  for (i = 0, l = labels.length; i < l; ++i){
190
190
  if (labels[i] !== null && labels[i] !== undefined && labels[i] !== ""){
191
191
  this.framesetter.attributedString = JSAttributedString.initWithString(labels[i], {
@@ -303,10 +303,10 @@ JSClass("CHAxis", JSObject, {
303
303
  var labelInsets = JSInsets(this.style.labelInsets);
304
304
  var labelTextFrame;
305
305
  if (this.edge === CHAxis.Edge.leading){
306
- this.framesetter.attributes.textAlignment = JSTextAlignment.right;
306
+ this.framesetter.defaultParagraphStyle.textAlignment = JSTextAlignment.right;
307
307
  labelInsets.right += Math.max(this.style.lineWidth / 2, majorTickMarkLength, minorTickMarkLength);
308
308
  }else{
309
- this.framesetter.attributes.textAlignment = JSTextAlignment.left;
309
+ this.framesetter.defaultParagraphStyle.textAlignment = JSTextAlignment.left;
310
310
  labelInsets.left += Math.max(this.style.lineWidth / 2, majorTickMarkLength, minorTickMarkLength);
311
311
  }
312
312
  var maxLabelSize = JSSize(rect.size.width - this.style.labelInsets.width, 0);
@@ -168,7 +168,7 @@ JSClass("CHPieChart", CHChart, {
168
168
 
169
169
  // draw labels
170
170
  if (this.showNames || this.showValues){
171
- this.framesetter.attributes.textAlignment = this.labelTextAlignment;
171
+ this.framesetter.defaultParagraphStyle.textAlignment = this.labelTextAlignment;
172
172
  context.save();
173
173
  context.translateBy(rect.center.x, rect.center.y);
174
174
  if (this.labelShadowColor !== null){
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ChartKit
3
- JSBundleVersion: 2022.23.0
3
+ JSBundleVersion: 2022.25.1
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.23.0
3
+ JSBundleVersion: 2022.25.1
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.23.0
3
+ JSBundleVersion: 2022.25.1
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.23.0
3
+ JSBundleVersion: 2022.25.1
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.23.0
3
+ JSBundleVersion: 2022.25.1
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: 2022.23.0
3
+ JSBundleVersion: 2022.25.1
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.23.0
3
+ JSBundleVersion: 2022.25.1
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments: