@breakside/jskit 2022.22.1 → 2022.23.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.
- package/Frameworks/DOM.jsframework/Info.json +2 -2
- package/Frameworks/DOM.jsframework/JS/XMLSerializer.js +9 -4
- package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
- package/Frameworks/DOM.jsframework/sources.json +10 -3
- package/Frameworks/FontKit.jsframework/Info.json +2 -2
- package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
- package/Frameworks/FontKit.jsframework/sources.json +34 -2
- package/Frameworks/Foundation.jsframework/Info.json +2 -2
- package/Frameworks/Foundation.jsframework/JS/JSAttributedString.js +213 -20
- package/Frameworks/Foundation.jsframework/JS/JSFont.js +39 -15
- package/Frameworks/Foundation.jsframework/JS/JSFontDescriptor+HTML.js +8 -0
- package/Frameworks/Foundation.jsframework/JS/JSFontDescriptor.js +105 -27
- package/Frameworks/Foundation.jsframework/JS/JSTextAttachment.js +6 -1
- package/Frameworks/Foundation.jsframework/JS/JSTextRun.js +3 -0
- package/Frameworks/Foundation.jsframework/JS/String+JS.js +34 -0
- package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/sources.json +167 -8
- package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
- package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
- package/Frameworks/SecurityKit.jsframework/sources.json +43 -2
- package/Info.json +2 -2
- package/Node/Builder.js +20 -9
- package/Node/FrameworkBuilder.js +22 -2
- package/Node/Project.js +22 -2
- package/Node/io.breakside.jskit-bundle.js +2 -2
- package/Node/jskit +7 -7
- package/Root/Frameworks/APIKit/Info.yaml +1 -1
- package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/AuthKit/Info.yaml +1 -1
- package/Root/Frameworks/CSSOM/Info.yaml +1 -1
- package/Root/Frameworks/ChartKit/Info.yaml +1 -1
- package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
- package/Root/Frameworks/DBKit/Info.yaml +1 -1
- package/Root/Frameworks/DOM/Info.yaml +1 -1
- package/Root/Frameworks/DOM/XMLSerializer.js +9 -4
- package/Root/Frameworks/Dispatch/Info.yaml +1 -1
- package/Root/Frameworks/FontKit/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/JSAttributedString.js +213 -20
- package/Root/Frameworks/Foundation/JSFont.js +39 -15
- package/Root/Frameworks/Foundation/JSFontDescriptor+HTML.js +8 -0
- package/Root/Frameworks/Foundation/JSFontDescriptor.js +105 -27
- package/Root/Frameworks/Foundation/JSTextAttachment.js +6 -1
- package/Root/Frameworks/Foundation/JSTextRun.js +3 -0
- package/Root/Frameworks/Foundation/String+JS.js +34 -0
- package/Root/Frameworks/ImageKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
- package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
- package/Root/Frameworks/PDFKit/Info.yaml +1 -1
- package/Root/Frameworks/QRKit/Info.yaml +1 -1
- package/Root/Frameworks/SearchKit/Info.yaml +1 -1
- package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/TestKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/UIHTMLTextFrame.js +3 -0
- package/Root/Frameworks/UIKit/UIHTMLTextRun.js +3 -1
- package/Root/Frameworks/UIKit/UIHTMLTextTypesetter.js +14 -0
- package/Root/Frameworks/UIKit/UILabel.js +43 -10
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/package.json +1 -1
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
// #import "UnicodeChar.js"
|
|
19
19
|
// #import "Zlib.js"
|
|
20
20
|
// #import "CoreTypes.js"
|
|
21
|
+
// #import "JSURLSession.js"
|
|
22
|
+
/* global JSFont */
|
|
21
23
|
'use strict';
|
|
22
24
|
|
|
23
25
|
(function(){
|
|
@@ -38,11 +40,11 @@ JSClass("JSFontDescriptor", JSObject, {
|
|
|
38
40
|
unitsPerEM: JSReadOnlyProperty('_unitsPerEM', 0),
|
|
39
41
|
|
|
40
42
|
descriptorWithWeight: function(weight){
|
|
41
|
-
return this;
|
|
43
|
+
return JSFontDescriptor.descriptorWithFamily(this.family, weight, this.style) || this;
|
|
42
44
|
},
|
|
43
45
|
|
|
44
46
|
descriptorWithStyle: function(style){
|
|
45
|
-
return this;
|
|
47
|
+
return JSFontDescriptor.descriptorWithFamily(this.family, this.weight, style) || this;
|
|
46
48
|
},
|
|
47
49
|
|
|
48
50
|
glyphForCharacter: function(character){
|
|
@@ -89,6 +91,29 @@ JSClass("JSFontDescriptor", JSObject, {
|
|
|
89
91
|
|
|
90
92
|
});
|
|
91
93
|
|
|
94
|
+
JSFontDescriptor.system = null;
|
|
95
|
+
|
|
96
|
+
JSFontDescriptor.descriptorsByFamily = {
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
JSFontDescriptor.registerDescriptor = function(descriptor){
|
|
100
|
+
if (!(descriptor._family in JSFontDescriptor.descriptorsByFamily)){
|
|
101
|
+
JSFontDescriptor.descriptorsByFamily[descriptor._family] = {};
|
|
102
|
+
}
|
|
103
|
+
if (!(descriptor._weight in JSFontDescriptor.descriptorsByFamily[descriptor._family])){
|
|
104
|
+
JSFontDescriptor.descriptorsByFamily[descriptor._family][descriptor._weight] = {};
|
|
105
|
+
}
|
|
106
|
+
if (!(descriptor._style in JSFontDescriptor.descriptorsByFamily[descriptor._family][descriptor._weight])){
|
|
107
|
+
JSFontDescriptor.descriptorsByFamily[descriptor._family][descriptor._weight][descriptor._style] = descriptor;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
JSFontDescriptor.descriptorWithFamily = function(family, weight, style){
|
|
112
|
+
var weights = JSFontDescriptor.descriptorsByFamily[family] || {};
|
|
113
|
+
var styles = weights[weight] || {};
|
|
114
|
+
return styles[style] || null;
|
|
115
|
+
};
|
|
116
|
+
|
|
92
117
|
JSClass("JSDataFontDescriptor", JSFontDescriptor, {
|
|
93
118
|
|
|
94
119
|
data: null,
|
|
@@ -131,23 +156,6 @@ JSClass("JSResourceFontDescriptor", JSFontDescriptor, {
|
|
|
131
156
|
widths: null,
|
|
132
157
|
};
|
|
133
158
|
JSResourceFontDescriptor.descriptorsByName[metadata.font.unique_identifier] = this;
|
|
134
|
-
if (!(this._family in JSResourceFontDescriptor.descriptorsByFamily)){
|
|
135
|
-
JSResourceFontDescriptor.descriptorsByFamily[this._family] = {};
|
|
136
|
-
}
|
|
137
|
-
if (!(this._weight in JSResourceFontDescriptor.descriptorsByFamily[this._family])){
|
|
138
|
-
JSResourceFontDescriptor.descriptorsByFamily[this._family][this._weight] = {};
|
|
139
|
-
}
|
|
140
|
-
if (!(this._style in JSResourceFontDescriptor.descriptorsByFamily[this._family][this._weight])){
|
|
141
|
-
JSResourceFontDescriptor.descriptorsByFamily[this._family][this._weight][this._style] = this;
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
descriptorWithWeight: function(weight){
|
|
146
|
-
return JSResourceFontDescriptor.descriptorWithFamily(this.family, weight, this.style) || this;
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
descriptorWithStyle: function(style){
|
|
150
|
-
return JSResourceFontDescriptor.descriptorWithFamily(this.family, this.weight, style) || this;
|
|
151
159
|
},
|
|
152
160
|
|
|
153
161
|
glyphForCharacter: function(character){
|
|
@@ -228,17 +236,87 @@ JSClass("JSResourceFontDescriptor", JSFontDescriptor, {
|
|
|
228
236
|
|
|
229
237
|
});
|
|
230
238
|
|
|
231
|
-
JSResourceFontDescriptor.
|
|
232
|
-
var weights = JSResourceFontDescriptor.descriptorsByFamily[family] || {};
|
|
233
|
-
var styles = weights[weight] || {};
|
|
234
|
-
return styles[style];
|
|
239
|
+
JSResourceFontDescriptor.descriptorsByName = {
|
|
235
240
|
};
|
|
236
241
|
|
|
237
|
-
|
|
238
|
-
};
|
|
242
|
+
JSClass("JSURLFontDescriptor", JSFontDescriptor, {
|
|
239
243
|
|
|
240
|
-
|
|
241
|
-
|
|
244
|
+
url: null,
|
|
245
|
+
|
|
246
|
+
initWithURL: function(url, family, weight, style){
|
|
247
|
+
this.url = url;
|
|
248
|
+
this._family = family;
|
|
249
|
+
this._weight = weight;
|
|
250
|
+
this._style = style;
|
|
251
|
+
this._postScriptName = "%s-%s".sprintf(family.replace(" ", ""), this.face.replce(" ", ""));
|
|
252
|
+
// this._ascender
|
|
253
|
+
// this._descender
|
|
254
|
+
// this._unitsPerEM
|
|
255
|
+
},
|
|
256
|
+
|
|
257
|
+
getData: function(completion, target){
|
|
258
|
+
if (!completion){
|
|
259
|
+
completion = Promise.completion(Promise.rejectNonNullSecondArgument);
|
|
260
|
+
}
|
|
261
|
+
var session = JSURLSession.shared;
|
|
262
|
+
var task = session.dataTaskWithURL(this.url, function(error){
|
|
263
|
+
if (error !== null){
|
|
264
|
+
completion.call(target, null, error);
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
try{
|
|
268
|
+
task.response.assertSuccess();
|
|
269
|
+
}catch (e){
|
|
270
|
+
completion.call(target, null, e);
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
completion.call(target, task.response.data, null);
|
|
274
|
+
});
|
|
275
|
+
task.resume();
|
|
276
|
+
return completion.promise;
|
|
277
|
+
},
|
|
278
|
+
|
|
279
|
+
face: JSLazyInitProperty(function(){
|
|
280
|
+
if (this.weight === JSFont.Weight.regular){
|
|
281
|
+
if (this.style === JSFont.Style.italic){
|
|
282
|
+
return "Italic";
|
|
283
|
+
}
|
|
284
|
+
return "Regular";
|
|
285
|
+
}
|
|
286
|
+
var name = "";
|
|
287
|
+
switch (this.weight){
|
|
288
|
+
case JSFont.Weight.ultraLight:
|
|
289
|
+
name = "UltraLight";
|
|
290
|
+
break;
|
|
291
|
+
case JSFont.Weight.thin:
|
|
292
|
+
name = "Thin";
|
|
293
|
+
break;
|
|
294
|
+
case JSFont.Weight.light:
|
|
295
|
+
name = "Light";
|
|
296
|
+
break;
|
|
297
|
+
case JSFont.Weight.medium:
|
|
298
|
+
name = "Medium";
|
|
299
|
+
break;
|
|
300
|
+
case JSFont.Weight.semibold:
|
|
301
|
+
name = "SemiBold";
|
|
302
|
+
break;
|
|
303
|
+
case JSFont.Weight.bold:
|
|
304
|
+
name = "Bold";
|
|
305
|
+
break;
|
|
306
|
+
case JSFont.Weight.heavy:
|
|
307
|
+
name = "Heavy";
|
|
308
|
+
break;
|
|
309
|
+
case JSFont.Weight.black:
|
|
310
|
+
name = "Black";
|
|
311
|
+
break;
|
|
312
|
+
}
|
|
313
|
+
if (this.style === JSFont.Style.italic){
|
|
314
|
+
name += " Italic";
|
|
315
|
+
}
|
|
316
|
+
return name;
|
|
317
|
+
}),
|
|
318
|
+
|
|
319
|
+
});
|
|
242
320
|
|
|
243
321
|
var CMap = function(format, data){
|
|
244
322
|
if (this === undefined){
|
|
@@ -55,7 +55,12 @@ JSClass("JSTextAttachment", JSObject, {
|
|
|
55
55
|
},
|
|
56
56
|
|
|
57
57
|
drawInContextAtPoint: function(context, point){
|
|
58
|
-
|
|
58
|
+
var rect = JSRect(point, this._size);
|
|
59
|
+
if (this._image.renderMode === JSImage.RenderMode.template){
|
|
60
|
+
context.fillMaskedRect(rect, this._image);
|
|
61
|
+
}else{
|
|
62
|
+
context.drawImage(this._image, rect);
|
|
63
|
+
}
|
|
59
64
|
}
|
|
60
65
|
|
|
61
66
|
});
|
|
@@ -61,7 +61,10 @@ JSClass("JSTextRun", JSObject, {
|
|
|
61
61
|
// context.fillEllipseInRect(JSRect(this.origin.x - 2.5, this.origin.y - 2.5, 5, 5));
|
|
62
62
|
// context.restore();
|
|
63
63
|
if (this.attachment){
|
|
64
|
+
context.save();
|
|
65
|
+
context.setFillColor(this.attributes.textColor);
|
|
64
66
|
this.attachment.drawInContextAtPoint(context, point);
|
|
67
|
+
context.restore();
|
|
65
68
|
}else{
|
|
66
69
|
context.save();
|
|
67
70
|
context.translateBy(point.x, point.y + this.font.ascender);
|
|
@@ -359,6 +359,34 @@ Object.defineProperties(String.prototype, {
|
|
|
359
359
|
}
|
|
360
360
|
},
|
|
361
361
|
|
|
362
|
+
utf16be: {
|
|
363
|
+
configurable: true,
|
|
364
|
+
enumerable: false,
|
|
365
|
+
value: function String_utf16be(){
|
|
366
|
+
var utf16 = JSData.initWithLength(this.length * 2);
|
|
367
|
+
var dataView = utf16.dataView();
|
|
368
|
+
var j = 0;
|
|
369
|
+
for (var i = 0, l = this.length; i < l; ++i, j += 2){
|
|
370
|
+
dataView.setUint16(j, this.charCodeAt(i));
|
|
371
|
+
}
|
|
372
|
+
return utf16;
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
|
|
376
|
+
utf16le: {
|
|
377
|
+
configurable: true,
|
|
378
|
+
enumerable: false,
|
|
379
|
+
value: function String_utf16le(){
|
|
380
|
+
var utf16 = JSData.initWithLength(this.length * 2);
|
|
381
|
+
var dataView = utf16.dataView();
|
|
382
|
+
var j = 0;
|
|
383
|
+
for (var i = 0, l = this.length; i < l; ++i, j += 2){
|
|
384
|
+
dataView.setUint16(j, this.charCodeAt(i), true);
|
|
385
|
+
}
|
|
386
|
+
return utf16;
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
|
|
362
390
|
latin1: {
|
|
363
391
|
enumerable: false,
|
|
364
392
|
value: function String_latin1(){
|
|
@@ -387,6 +415,12 @@ Object.defineProperties(String.prototype, {
|
|
|
387
415
|
if (encoding == String.Encoding.latin1){
|
|
388
416
|
return this.latin1();
|
|
389
417
|
}
|
|
418
|
+
if (encoding == String.Encoding.utf16be){
|
|
419
|
+
return this.utf16be();
|
|
420
|
+
}
|
|
421
|
+
if (encoding == String.Encoding.utf16le){
|
|
422
|
+
return this.utf16le();
|
|
423
|
+
}
|
|
390
424
|
return null;
|
|
391
425
|
}
|
|
392
426
|
},
|
|
@@ -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.
|
|
6
|
+
"JSBundleVersion": "2022.23.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": "
|
|
14
|
+
"GitRevision": "e2a77335b26d1a321448e73eb7b733cdd0714cc8"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [
|
|
17
17
|
{
|
|
@@ -48,19 +48,19 @@
|
|
|
48
48
|
"JSXMLParser.js",
|
|
49
49
|
"JSImage.js",
|
|
50
50
|
"JSTextAttachment.js",
|
|
51
|
-
"JSAttributedString.js",
|
|
52
|
-
"JSSpec.js",
|
|
53
|
-
"JSArrayController.js",
|
|
54
|
-
"JSSparseArrayController.js",
|
|
55
|
-
"JSColorSpace.js",
|
|
56
|
-
"JSColor.js",
|
|
57
|
-
"JSGradient.js",
|
|
58
51
|
"Huffman.js",
|
|
59
52
|
"Deflate.js",
|
|
60
53
|
"Adler32.js",
|
|
61
54
|
"Zlib.js",
|
|
62
55
|
"JSFontDescriptor.js",
|
|
63
56
|
"JSFont.js",
|
|
57
|
+
"JSColorSpace.js",
|
|
58
|
+
"JSColor.js",
|
|
59
|
+
"JSAttributedString.js",
|
|
60
|
+
"JSSpec.js",
|
|
61
|
+
"JSArrayController.js",
|
|
62
|
+
"JSSparseArrayController.js",
|
|
63
|
+
"JSGradient.js",
|
|
64
64
|
"JSPath.js",
|
|
65
65
|
"JSContext.js",
|
|
66
66
|
"JSDateFormatter.js",
|
|
@@ -122,6 +122,147 @@
|
|
|
122
122
|
"setInterval",
|
|
123
123
|
"ArrayBuffer",
|
|
124
124
|
"Uint8Array"
|
|
125
|
+
],
|
|
126
|
+
"globals": [
|
|
127
|
+
"JSCopy",
|
|
128
|
+
"JSDeepCopy",
|
|
129
|
+
"JSResolveDottedName",
|
|
130
|
+
"JSSetDottedName",
|
|
131
|
+
"JSSize",
|
|
132
|
+
"JSPoint",
|
|
133
|
+
"JSInsets",
|
|
134
|
+
"JSRect",
|
|
135
|
+
"JSAffineTransform",
|
|
136
|
+
"JSRange",
|
|
137
|
+
"JSConstraintBox",
|
|
138
|
+
"JSLineBreakMode",
|
|
139
|
+
"JSTextAlignment",
|
|
140
|
+
"UnicodeProperties",
|
|
141
|
+
"UnicodeChar",
|
|
142
|
+
"JSData",
|
|
143
|
+
"Promise",
|
|
144
|
+
"JSMath",
|
|
145
|
+
"JSCubicBezier",
|
|
146
|
+
"JSBinarySearcher",
|
|
147
|
+
"JSIndexRange",
|
|
148
|
+
"JSIndexSet",
|
|
149
|
+
"JSIndexPath",
|
|
150
|
+
"JSIndexPathRange",
|
|
151
|
+
"JSIndexPathSet",
|
|
152
|
+
"UUID",
|
|
153
|
+
"JSClass",
|
|
154
|
+
"JSCustomProperty",
|
|
155
|
+
"JSDynamicProperty",
|
|
156
|
+
"JSReadOnlyProperty",
|
|
157
|
+
"JSLazyInitProperty",
|
|
158
|
+
"JSOutlet",
|
|
159
|
+
"JSProtocol",
|
|
160
|
+
"JSIsNullValueTransformer",
|
|
161
|
+
"JSIsNotNullValueTransformer",
|
|
162
|
+
"JSIsEmptyValueTransformer",
|
|
163
|
+
"JSIsNotEmptyValueTransformer",
|
|
164
|
+
"JSNegateBooleanValueTransformer",
|
|
165
|
+
"JSCommaSeparatedListValueTransformer",
|
|
166
|
+
"JSObject",
|
|
167
|
+
"JSLog",
|
|
168
|
+
"JSObjectGraphLoading",
|
|
169
|
+
"JSObjectGraph",
|
|
170
|
+
"JSDate",
|
|
171
|
+
"JSTimeZone",
|
|
172
|
+
"JSTimeInterval",
|
|
173
|
+
"JSCalendar",
|
|
174
|
+
"JSGregorianCalendar",
|
|
175
|
+
"JSLocale",
|
|
176
|
+
"JSMediaType",
|
|
177
|
+
"JSFile",
|
|
178
|
+
"JSDataFile",
|
|
179
|
+
"JSBundle",
|
|
180
|
+
"JSBundleResourceFile",
|
|
181
|
+
"JSFormFieldMap",
|
|
182
|
+
"JSFormField",
|
|
183
|
+
"JSURL",
|
|
184
|
+
"JSMIMEHeaderMap",
|
|
185
|
+
"JSMIMEHeader",
|
|
186
|
+
"JSURLRequest",
|
|
187
|
+
"JSURLSession",
|
|
188
|
+
"JSURLResponse",
|
|
189
|
+
"JSURLResponseError",
|
|
190
|
+
"JSXMLParser",
|
|
191
|
+
"JSImage",
|
|
192
|
+
"_JSResourceImage",
|
|
193
|
+
"_JSDataImage",
|
|
194
|
+
"_JSURLImage",
|
|
195
|
+
"JSTextAttachment",
|
|
196
|
+
"HuffmanTree",
|
|
197
|
+
"DeflateStream",
|
|
198
|
+
"Deflate",
|
|
199
|
+
"Adler32",
|
|
200
|
+
"Zlib",
|
|
201
|
+
"ZlibStream",
|
|
202
|
+
"JSFontDescriptor",
|
|
203
|
+
"JSDataFontDescriptor",
|
|
204
|
+
"JSResourceFontDescriptor",
|
|
205
|
+
"JSURLFontDescriptor",
|
|
206
|
+
"JSTestFontDescriptor",
|
|
207
|
+
"JSFont",
|
|
208
|
+
"JSColorSpace",
|
|
209
|
+
"JSXYZColorSpace",
|
|
210
|
+
"JSXYZScaledColorSpace",
|
|
211
|
+
"JSLabColorSpace",
|
|
212
|
+
"JSRGBColorSpace",
|
|
213
|
+
"JSGrayColorSpace",
|
|
214
|
+
"JSDerivedColorSpace",
|
|
215
|
+
"JSMappedColorSpace",
|
|
216
|
+
"JSIndexedColorSpace",
|
|
217
|
+
"JSNamedColorSpace",
|
|
218
|
+
"JSColor",
|
|
219
|
+
"JSAttributedString",
|
|
220
|
+
"JSSpec",
|
|
221
|
+
"JSArrayController",
|
|
222
|
+
"JSSparseArrayController",
|
|
223
|
+
"JSGradient",
|
|
224
|
+
"JSPath",
|
|
225
|
+
"JSContext",
|
|
226
|
+
"JSDateFormatter",
|
|
227
|
+
"JSNumberFormatter",
|
|
228
|
+
"JSTextLayoutManager",
|
|
229
|
+
"JSTextRun",
|
|
230
|
+
"JSTextLine",
|
|
231
|
+
"JSTextTypesetter",
|
|
232
|
+
"JSTextFrame",
|
|
233
|
+
"JSTextFramesetter",
|
|
234
|
+
"JSTextContainer",
|
|
235
|
+
"JSTextLayoutManagerDelegate",
|
|
236
|
+
"JSTextStorage",
|
|
237
|
+
"JSTimer",
|
|
238
|
+
"JSRunLoop",
|
|
239
|
+
"JSIPAddress",
|
|
240
|
+
"JSURLSessionTask",
|
|
241
|
+
"JSURLSessionDataTask",
|
|
242
|
+
"JSURLSessionUploadTask",
|
|
243
|
+
"JSURLSessionStreamTask",
|
|
244
|
+
"JSURLSessionDelegate",
|
|
245
|
+
"JSURLSessionStreamTaskDelegate",
|
|
246
|
+
"JSHTTPResponseParserDelegate",
|
|
247
|
+
"JSHTTPResponseParser",
|
|
248
|
+
"JSHTTPWebSocketParser",
|
|
249
|
+
"JSHTTPWebSocketParserDelegate",
|
|
250
|
+
"JSNotification",
|
|
251
|
+
"JSNotificationCenter",
|
|
252
|
+
"JSFileManager",
|
|
253
|
+
"JSFileEnumerator",
|
|
254
|
+
"JSFileArrayFileEnumerator",
|
|
255
|
+
"JSUserDefaults",
|
|
256
|
+
"JSUndoManager",
|
|
257
|
+
"JSDistributedNotificationCenter",
|
|
258
|
+
"JSSynchronizer",
|
|
259
|
+
"JSCRC32",
|
|
260
|
+
"JSZip",
|
|
261
|
+
"JSIterativeHash",
|
|
262
|
+
"JSSHA1Hash",
|
|
263
|
+
"JSMD5Hash",
|
|
264
|
+
"JSArguments",
|
|
265
|
+
"JSEnvironment"
|
|
125
266
|
]
|
|
126
267
|
},
|
|
127
268
|
"html": {
|
|
@@ -156,6 +297,16 @@
|
|
|
156
297
|
"FileReader",
|
|
157
298
|
"URL.createObjectURL",
|
|
158
299
|
"URL.revokeObjectURL"
|
|
300
|
+
],
|
|
301
|
+
"globals": [
|
|
302
|
+
"JSHTMLHTTPClient",
|
|
303
|
+
"JSHTMLURLSessionDataTask",
|
|
304
|
+
"JSHTMLURLSessionUploadTask",
|
|
305
|
+
"JSHTMLURLSessionStreamTask",
|
|
306
|
+
"JSHTMLFileManager",
|
|
307
|
+
"JSHTMLFile",
|
|
308
|
+
"JSHTMLFileListFileEnumerator",
|
|
309
|
+
"JSHTMLFileSystemEntryFileEnumerator"
|
|
159
310
|
]
|
|
160
311
|
},
|
|
161
312
|
"node": {
|
|
@@ -175,6 +326,14 @@
|
|
|
175
326
|
"JSAMQPNotificationCenter.js",
|
|
176
327
|
"Foundation+Node.js"
|
|
177
328
|
],
|
|
178
|
-
"features": []
|
|
329
|
+
"features": [],
|
|
330
|
+
"globals": [
|
|
331
|
+
"JSNodeFileManager",
|
|
332
|
+
"JSNodeHTTPClient",
|
|
333
|
+
"JSNodeURLSessionDataTask",
|
|
334
|
+
"JSNodeURLSessionUploadTask",
|
|
335
|
+
"JSNodeURLSessionStreamTask",
|
|
336
|
+
"JSAMQPNotificationCenter"
|
|
337
|
+
]
|
|
179
338
|
}
|
|
180
339
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
|
|
4
|
-
"JSBundleVersion": "2022.
|
|
4
|
+
"JSBundleVersion": "2022.23.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": "
|
|
12
|
+
"GitRevision": "e2a77335b26d1a321448e73eb7b733cdd0714cc8"
|
|
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.
|
|
6
|
+
"JSBundleVersion": "2022.23.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": "
|
|
14
|
+
"GitRevision": "e2a77335b26d1a321448e73eb7b733cdd0714cc8"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [],
|
|
17
17
|
"ResourceLookup": {
|
|
@@ -23,7 +23,40 @@
|
|
|
23
23
|
"SECCBOR.js",
|
|
24
24
|
"SecurityKit.js"
|
|
25
25
|
],
|
|
26
|
-
"features": []
|
|
26
|
+
"features": [],
|
|
27
|
+
"globals": [
|
|
28
|
+
"SECKey",
|
|
29
|
+
"SECDataKey",
|
|
30
|
+
"SECJSONWebAlgorithms",
|
|
31
|
+
"SECCipher",
|
|
32
|
+
"SECCipherAESCipherBlockChaining",
|
|
33
|
+
"SECCipherAESCounter",
|
|
34
|
+
"SECCipherAESGaloisCounterMode",
|
|
35
|
+
"SECCipherRC4",
|
|
36
|
+
"SECHash",
|
|
37
|
+
"SECVerify",
|
|
38
|
+
"SECKeychain",
|
|
39
|
+
"SECHMAC",
|
|
40
|
+
"SECSign",
|
|
41
|
+
"SECJSONWebToken",
|
|
42
|
+
"SECPassword",
|
|
43
|
+
"SECASN1Value",
|
|
44
|
+
"SECASN1Boolean",
|
|
45
|
+
"SECASN1Integer",
|
|
46
|
+
"SECASN1BitString",
|
|
47
|
+
"SECASN1OctetString",
|
|
48
|
+
"SECASN1ObjectIdentifier",
|
|
49
|
+
"SECASN1Sequence",
|
|
50
|
+
"SECASN1UTF8String",
|
|
51
|
+
"SECASN1Optional",
|
|
52
|
+
"SECASN1Unknown",
|
|
53
|
+
"SECASN1Parser",
|
|
54
|
+
"SECOneTimePassword",
|
|
55
|
+
"SECKeystore",
|
|
56
|
+
"SECDeviceAuthentication",
|
|
57
|
+
"SECCBOR",
|
|
58
|
+
"SECCBORParser"
|
|
59
|
+
]
|
|
27
60
|
},
|
|
28
61
|
"html": {
|
|
29
62
|
"frameworks": [],
|
|
@@ -42,6 +75,11 @@
|
|
|
42
75
|
"features": [
|
|
43
76
|
"window.crypto.subtle",
|
|
44
77
|
"window.crypto.subtle"
|
|
78
|
+
],
|
|
79
|
+
"globals": [
|
|
80
|
+
"SECHTMLKey",
|
|
81
|
+
"SECHTMLDeviceAuthentication",
|
|
82
|
+
"SECHTMLPasswordCredentialKeychain"
|
|
45
83
|
]
|
|
46
84
|
},
|
|
47
85
|
"node": {
|
|
@@ -56,6 +94,9 @@
|
|
|
56
94
|
"SECPassword+Node.js",
|
|
57
95
|
"SecurityKit+Node.js"
|
|
58
96
|
],
|
|
59
|
-
"features": []
|
|
97
|
+
"features": [],
|
|
98
|
+
"globals": [
|
|
99
|
+
"SECNodeKey"
|
|
100
|
+
]
|
|
60
101
|
}
|
|
61
102
|
}
|
package/Info.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "node",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
4
|
-
"JSBundleVersion": "2022.
|
|
4
|
+
"JSBundleVersion": "2022.23.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": "
|
|
11
|
+
"GitRevision": "e2a77335b26d1a321448e73eb7b733cdd0714cc8"
|
|
12
12
|
}
|
package/Node/Builder.js
CHANGED
|
@@ -174,20 +174,31 @@ JSClass("Builder", JSObject, {
|
|
|
174
174
|
if (!seen.has(name)){
|
|
175
175
|
seen.add(name);
|
|
176
176
|
// If the framework was pre-built, then it can only have
|
|
177
|
-
// dependencies on
|
|
178
|
-
//
|
|
179
|
-
//
|
|
177
|
+
// dependencies on other pre-built frameworks, which
|
|
178
|
+
// are other .jsframework bundles or JSKit frameworks
|
|
179
|
+
//
|
|
180
180
|
// If we built the framework, then we already added its
|
|
181
181
|
// dependencies based on its build reuslts and won't get here.
|
|
182
|
-
let
|
|
183
|
-
let
|
|
184
|
-
|
|
185
|
-
|
|
182
|
+
let includeDirectoryURLs = this.project.includeDirectoryURLs;
|
|
183
|
+
let url = null;
|
|
184
|
+
for (let i = 0, l = includeDirectoryURLs.length; i < l && url === null; ++i){
|
|
185
|
+
let directoryURL = includeDirectoryURLs[i];
|
|
186
|
+
let candidateURL = directoryURL.appendingPathComponent(name + '.jsframework', true);
|
|
187
|
+
let found = await this.fileManager.itemExistsAtURL(candidateURL);
|
|
188
|
+
if (found){
|
|
189
|
+
url = candidateURL;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if (url === null){
|
|
193
|
+
url = this.fileManager.urlForPath(JSKitRootDirectoryPath).appendingPathComponents(["Frameworks", name], true);
|
|
194
|
+
let found = await this.fileManager.itemExistsAtURL(url);
|
|
195
|
+
if (!found){
|
|
196
|
+
throw new Error("Cannot find framework %s, (required by %s)".sprintf(name, url.lastPathComponent));
|
|
197
|
+
}
|
|
186
198
|
}
|
|
187
|
-
this.printer.print("\nAdding dependency %s\n".sprintf(name));
|
|
188
199
|
imports.push({
|
|
189
200
|
name: name,
|
|
190
|
-
url:
|
|
201
|
+
url: url
|
|
191
202
|
});
|
|
192
203
|
}
|
|
193
204
|
}
|