@breakside/jskit 2023.7.0 → 2023.9.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.
- package/Frameworks/DOM.jsframework/Info.json +2 -2
- package/Frameworks/DOM.jsframework/JS/DOMParser.js +72 -63
- package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
- package/Frameworks/FontKit.jsframework/Info.json +2 -2
- package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/Info.json +2 -2
- package/Frameworks/Foundation.jsframework/JS/JSImage.js +13 -16
- package/Frameworks/Foundation.jsframework/JS/JSNumberFormatter.js +105 -8
- package/Frameworks/Foundation.jsframework/JS/JSXMLParser.js +206 -101
- package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/sources.json +2 -0
- package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
- package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
- package/Info.json +2 -2
- package/Node/Resources.js +13 -16
- package/Node/io.breakside.jskit-bundle.js +2 -2
- 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/CHAreaChart.js +2 -0
- package/Root/Frameworks/ChartKit/CHLineChart.js +2 -0
- package/Root/Frameworks/ChartKit/CHSeriesStyle.js +1 -0
- package/Root/Frameworks/ChartKit/CHStackedAreaChart.js +1 -0
- 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/DOMParser.js +72 -63
- package/Root/Frameworks/DOM/Info.yaml +1 -1
- 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/JSImage.js +13 -16
- package/Root/Frameworks/Foundation/JSNumberFormatter.js +105 -8
- package/Root/Frameworks/Foundation/JSXMLParser.js +206 -101
- 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/UIAccessibility.js +1 -0
- package/Root/Frameworks/UIKit/UIColorPanel.js +4 -0
- package/Root/Frameworks/UIKit/UIHTMLWindowServer.js +9 -0
- package/Root/Frameworks/UIKit/UINavigationController.js +6 -1
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/package.json +1 -1
|
@@ -14,25 +14,58 @@
|
|
|
14
14
|
// limitations under the License.
|
|
15
15
|
|
|
16
16
|
// #import "JSObject.js"
|
|
17
|
+
// #import "JSProtocol.js"
|
|
18
|
+
// #import "String+JS.js"
|
|
17
19
|
'use strict';
|
|
18
20
|
|
|
19
21
|
(function(){
|
|
20
22
|
|
|
23
|
+
JSProtocol("JSXMLParserDelegate", JSProtocol, {
|
|
24
|
+
|
|
25
|
+
xmlParserDidBeginDocument: function(parser){},
|
|
26
|
+
xmlParserDidEndDocument: function(parser){},
|
|
27
|
+
xmlParserFoundDocumentType: function(parser, name, publicId, systemId){},
|
|
28
|
+
xmlParserFoundProcessingInstruction: function(parser, name, data){},
|
|
29
|
+
xmlParserDidBeginElement: function(parser, name, prefix, namespace, attributes){},
|
|
30
|
+
xmlParserDidEndElement: function(parser, name, prefix, namespace){},
|
|
31
|
+
xmlParserFoundComment: function(parser, text){},
|
|
32
|
+
xmlParserFoundCDATA: function(parser, text){},
|
|
33
|
+
xmlParserFoundText: function(parser, text){},
|
|
34
|
+
xmlParserErrorOccurred: function(parser, error){}
|
|
35
|
+
|
|
36
|
+
});
|
|
37
|
+
|
|
21
38
|
JSClass("JSXMLParser", JSObject, {
|
|
22
39
|
|
|
23
|
-
|
|
40
|
+
initWithData: function(data, encoding){
|
|
41
|
+
if (encoding === undefined){
|
|
42
|
+
encoding = String.Encoding.utf8;
|
|
43
|
+
}
|
|
44
|
+
var xml = String.initWithData(data, encoding);
|
|
45
|
+
this.initWithString(xml);
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
initWithString: function(str){
|
|
49
|
+
this.xml = str;
|
|
50
|
+
},
|
|
24
51
|
|
|
25
|
-
|
|
52
|
+
mode: "xml",
|
|
53
|
+
|
|
54
|
+
xml: null,
|
|
55
|
+
error: null,
|
|
26
56
|
isStopped: false,
|
|
27
57
|
|
|
28
58
|
stop: function(){
|
|
29
59
|
this.isStopped = true;
|
|
30
60
|
},
|
|
31
61
|
|
|
32
|
-
parse: function(
|
|
62
|
+
parse: function(){
|
|
63
|
+
this.isStopped = false;
|
|
64
|
+
this.error = null;
|
|
65
|
+
var input = this.xml;
|
|
33
66
|
var length = input.length;
|
|
34
67
|
var offset = 0;
|
|
35
|
-
var isHTML = this.
|
|
68
|
+
var isHTML = this.mode === JSXMLParser.Mode.html;
|
|
36
69
|
var c;
|
|
37
70
|
var lineNumber = 1;
|
|
38
71
|
var lineOffset;
|
|
@@ -309,13 +342,13 @@ JSClass("JSXMLParser", JSObject, {
|
|
|
309
342
|
name: resolved.name,
|
|
310
343
|
prefix: resolved.prefix,
|
|
311
344
|
namespace: resolved.namespace,
|
|
312
|
-
attributes:
|
|
345
|
+
attributes: JSXMLAttributeMap()
|
|
313
346
|
};
|
|
314
347
|
for (i = 0, l = attributes.length; i < l; ++i){
|
|
315
348
|
attr = attributes[i];
|
|
316
349
|
if (!attr.name.startsWith("xmlns:") && attr.name != "xmlns"){
|
|
317
350
|
resolved = resolveNamespace(attr.name, true);
|
|
318
|
-
element.attributes.
|
|
351
|
+
element.attributes.add({
|
|
319
352
|
name: resolved.name,
|
|
320
353
|
prefix: resolved.prefix,
|
|
321
354
|
namespace: resolved.namespace,
|
|
@@ -325,110 +358,125 @@ JSClass("JSXMLParser", JSObject, {
|
|
|
325
358
|
}
|
|
326
359
|
return element;
|
|
327
360
|
};
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
361
|
+
try{
|
|
362
|
+
var obj;
|
|
363
|
+
if (isHTML){
|
|
364
|
+
readWhitespace();
|
|
365
|
+
}else{
|
|
366
|
+
obj = readObject();
|
|
367
|
+
if (obj === null || obj.kind != 'PI' || obj.name != 'xml'){
|
|
368
|
+
throw new Error("Expecting <?xml at start of document");
|
|
369
|
+
}
|
|
370
|
+
}
|
|
333
371
|
obj = readObject();
|
|
334
|
-
|
|
335
|
-
|
|
372
|
+
var elementStack = [];
|
|
373
|
+
var namespaces = {
|
|
374
|
+
':default:': null,
|
|
375
|
+
'xml': 'http://www.w3.org/XML/1998/namespace'
|
|
376
|
+
};
|
|
377
|
+
var namespacesStack = [];
|
|
378
|
+
var hasDocumentElement = false;
|
|
379
|
+
var hasSentDoctype = false;
|
|
380
|
+
var element;
|
|
381
|
+
if (this.delegate && this.delegate.xmlParserDidBeginDocument){
|
|
382
|
+
this.delegate.xmlParserDidBeginDocument(this);
|
|
336
383
|
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
':default:': null,
|
|
342
|
-
'xml': 'http://www.w3.org/XML/1998/namespace'
|
|
343
|
-
};
|
|
344
|
-
var namespacesStack = [];
|
|
345
|
-
var hasDocumentElement = false;
|
|
346
|
-
var hasSentDoctype = false;
|
|
347
|
-
if (listener.beginDocument){
|
|
348
|
-
listener.beginDocument();
|
|
349
|
-
}
|
|
350
|
-
while (!this.isStopped && obj !== null){
|
|
351
|
-
if (obj.kind == 'Doctype'){
|
|
352
|
-
if (hasSentDoctype){
|
|
353
|
-
throw new Error("Only one doctype allowed");
|
|
354
|
-
}
|
|
355
|
-
if (hasDocumentElement){
|
|
356
|
-
throw new Error("Doctype must come before the document element");
|
|
357
|
-
}
|
|
358
|
-
if (elementNameStack.length > 0){
|
|
359
|
-
throw new Error("Doctype only allowed at document root");
|
|
360
|
-
}
|
|
361
|
-
if (listener.handleDocumentType){
|
|
362
|
-
listener.handleDocumentType(obj.name, obj.publicId || null, obj.systemId || null);
|
|
363
|
-
}
|
|
364
|
-
hasSentDoctype = true;
|
|
365
|
-
}else if (obj.kind == "PI"){
|
|
366
|
-
if (elementNameStack.length > 0){
|
|
367
|
-
throw new Error("Processing instructions only allowed at document root");
|
|
368
|
-
}
|
|
369
|
-
if (listener.handleProcessingInstruction){
|
|
370
|
-
listener.handleProcessingInstruction(obj.name, obj.value);
|
|
371
|
-
}
|
|
372
|
-
}else if (obj.kind == 'CDATA'){
|
|
373
|
-
if (elementNameStack.length === 0){
|
|
374
|
-
throw new Error("CDATA not allowed at document root");
|
|
375
|
-
}
|
|
376
|
-
if (listener.handleCDATA){
|
|
377
|
-
listener.handleCDATA(obj.value);
|
|
378
|
-
}
|
|
379
|
-
}else if (obj.kind == 'Comment'){
|
|
380
|
-
if (listener.handleComment){
|
|
381
|
-
listener.handleComment(obj.value);
|
|
382
|
-
}
|
|
383
|
-
}else if (obj.kind == 'ElementStart'){
|
|
384
|
-
if (elementNameStack.length === 0){
|
|
385
|
-
hasDocumentElement = true;
|
|
386
|
-
}
|
|
387
|
-
elementNameStack.push(obj.name);
|
|
388
|
-
namespacesStack.push(namespaces);
|
|
389
|
-
namespaces = Object.create(namespaces);
|
|
390
|
-
var element = resolveElementNamespace(obj.name, obj.attributes);
|
|
391
|
-
if (listener.beginElement){
|
|
392
|
-
listener.beginElement(element.name, element.prefix, element.namespace, element.attributes, obj.isClosed);
|
|
393
|
-
}
|
|
394
|
-
var elementIsClosed = obj.isClosed;
|
|
395
|
-
if (obj.rawContents !== null){
|
|
396
|
-
if (!this.isStopped && listener.handleText && obj.rawContents.length > 0){
|
|
397
|
-
listener.handleText(obj.rawContents);
|
|
384
|
+
while (!this.isStopped && obj !== null){
|
|
385
|
+
if (obj.kind == 'Doctype'){
|
|
386
|
+
if (hasSentDoctype){
|
|
387
|
+
throw new Error("Only one doctype allowed");
|
|
398
388
|
}
|
|
399
|
-
if (
|
|
400
|
-
|
|
389
|
+
if (hasDocumentElement){
|
|
390
|
+
throw new Error("Doctype must come before the document element");
|
|
401
391
|
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
392
|
+
if (elementStack.length > 0){
|
|
393
|
+
throw new Error("Doctype only allowed at document root");
|
|
394
|
+
}
|
|
395
|
+
if (this.delegate && this.delegate.xmlParserFoundDocumentType){
|
|
396
|
+
this.delegate.xmlParserFoundDocumentType(this, obj.name, obj.publicId || null, obj.systemId || null);
|
|
397
|
+
}
|
|
398
|
+
hasSentDoctype = true;
|
|
399
|
+
}else if (obj.kind == "PI"){
|
|
400
|
+
if (elementStack.length > 0){
|
|
401
|
+
throw new Error("Processing instructions only allowed at document root");
|
|
402
|
+
}
|
|
403
|
+
if (this.delegate && this.delegate.xmlParserFoundProcessingInstruction){
|
|
404
|
+
this.delegate.xmlParserFoundProcessingInstruction(this, obj.name, obj.value);
|
|
405
|
+
}
|
|
406
|
+
}else if (obj.kind == 'CDATA'){
|
|
407
|
+
if (elementStack.length === 0){
|
|
408
|
+
throw new Error("CDATA not allowed at document root");
|
|
409
|
+
}
|
|
410
|
+
if (this.delegate && this.delegate.xmlParserFoundCDATA){
|
|
411
|
+
this.delegate.xmlParserFoundCDATA(this, obj.value);
|
|
412
|
+
}
|
|
413
|
+
}else if (obj.kind == 'Comment'){
|
|
414
|
+
if (this.delegate && this.delegate.xmlParserFoundComment){
|
|
415
|
+
this.delegate.xmlParserFoundComment(this, obj.value);
|
|
416
|
+
}
|
|
417
|
+
}else if (obj.kind == 'ElementStart'){
|
|
418
|
+
if (elementStack.length === 0){
|
|
419
|
+
hasDocumentElement = true;
|
|
420
|
+
}
|
|
421
|
+
namespacesStack.push(namespaces);
|
|
422
|
+
namespaces = Object.create(namespaces);
|
|
423
|
+
element = resolveElementNamespace(obj.name, obj.attributes);
|
|
424
|
+
elementStack.push(element);
|
|
425
|
+
if (this.delegate && this.delegate.xmlParserDidBeginElement){
|
|
426
|
+
this.delegate.xmlParserDidBeginElement(this, element.name, element.prefix, element.namespace, element.attributes);
|
|
427
|
+
}
|
|
428
|
+
var elementIsClosed = obj.isClosed;
|
|
429
|
+
if (obj.rawContents !== null){
|
|
430
|
+
if (!this.isStopped && this.delegate.xmlParserFoundText && obj.rawContents.length > 0){
|
|
431
|
+
this.delegate.xmlParserFoundText(this, obj.rawContents);
|
|
432
|
+
}
|
|
433
|
+
elementIsClosed = true;
|
|
434
|
+
}
|
|
435
|
+
if (elementIsClosed){
|
|
436
|
+
if (!this.isStopped && this.delegate.xmlParserDidEndElement){
|
|
437
|
+
this.delegate.xmlParserDidEndElement(this, element.name, element.prefix, element.namespace);
|
|
438
|
+
}
|
|
439
|
+
elementStack.pop();
|
|
440
|
+
namespaces = namespacesStack.pop();
|
|
441
|
+
}
|
|
442
|
+
}else if (obj.kind == 'Text'){
|
|
443
|
+
if (elementStack.length === 0){
|
|
444
|
+
if (!obj.value.match(/^[\r\n\t ]*$/)){
|
|
445
|
+
throw new Error("Text not allowed at the document root");
|
|
446
|
+
}
|
|
447
|
+
}else{
|
|
448
|
+
if (this.delegate && this.delegate.xmlParserFoundText){
|
|
449
|
+
this.delegate.xmlParserFoundText(this, obj.value);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}else if (obj.kind == 'ElementEnd'){
|
|
453
|
+
element = elementStack.pop();
|
|
406
454
|
namespaces = namespacesStack.pop();
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
455
|
+
if (element.prefix !== null){
|
|
456
|
+
if (obj.name != element.prefix + ":" + element.name){
|
|
457
|
+
throw new Error("Mismatched end tag");
|
|
458
|
+
}
|
|
459
|
+
}else{
|
|
460
|
+
if (obj.name != element.name){
|
|
461
|
+
throw new Error("Mismatched end tag");
|
|
462
|
+
}
|
|
412
463
|
}
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
listener.handleText(obj.value);
|
|
464
|
+
if (this.delegate && this.delegate.xmlParserDidEndElement){
|
|
465
|
+
this.delegate.xmlParserDidEndElement(this, element.name, element.prefix, element.namespace);
|
|
416
466
|
}
|
|
417
467
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
468
|
+
obj = readObject();
|
|
469
|
+
}
|
|
470
|
+
if (!this.isStopped && this.delegate.xmlParserDidEndDocument){
|
|
471
|
+
this.delegate.xmlParserDidEndDocument(this);
|
|
472
|
+
}
|
|
473
|
+
}catch (e){
|
|
474
|
+
this.isStopped = true;
|
|
475
|
+
if (this.delegate && this.delegate.xmlParserErrorOccurred){
|
|
476
|
+
this.delegate.xmlParserErrorOccurred(this, e);
|
|
477
|
+
}else{
|
|
478
|
+
throw e;
|
|
427
479
|
}
|
|
428
|
-
obj = readObject();
|
|
429
|
-
}
|
|
430
|
-
if (!this.isStopped && listener.endDocument){
|
|
431
|
-
listener.endDocument();
|
|
432
480
|
}
|
|
433
481
|
}
|
|
434
482
|
|
|
@@ -518,4 +566,61 @@ var htmlElements = {
|
|
|
518
566
|
raw: new Set(['script', 'style'])
|
|
519
567
|
};
|
|
520
568
|
|
|
569
|
+
JSXMLParser.Mode = {
|
|
570
|
+
xml: "xml",
|
|
571
|
+
html: "html"
|
|
572
|
+
};
|
|
573
|
+
|
|
574
|
+
JSGlobalObject.JSXMLAttributeMap = function(){
|
|
575
|
+
if (this === undefined){
|
|
576
|
+
return new JSXMLAttributeMap();
|
|
577
|
+
}
|
|
578
|
+
this.namespaces = {};
|
|
579
|
+
this.noNamespace = {};
|
|
580
|
+
this.attributes = [];
|
|
581
|
+
};
|
|
582
|
+
|
|
583
|
+
JSXMLAttributeMap.prototype = {
|
|
584
|
+
|
|
585
|
+
namespaces: null,
|
|
586
|
+
noNamespace: null,
|
|
587
|
+
attributes: null,
|
|
588
|
+
|
|
589
|
+
add: function(attr){
|
|
590
|
+
this.attributes.push(attr);
|
|
591
|
+
var map = this.noNamespace;
|
|
592
|
+
if (attr.namespace){
|
|
593
|
+
map = this.namespaces[attr.namespace];
|
|
594
|
+
if (!map){
|
|
595
|
+
map = this.namespaces[attr.namespace] = {};
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
map[attr.name] = attr;
|
|
599
|
+
},
|
|
600
|
+
|
|
601
|
+
all: function(){
|
|
602
|
+
return this.attributes;
|
|
603
|
+
},
|
|
604
|
+
|
|
605
|
+
contains: function(name, namespace){
|
|
606
|
+
var map = namespace ? this.namespaces[namespace] : this.noNamespace;
|
|
607
|
+
if (map){
|
|
608
|
+
return name in map;
|
|
609
|
+
}
|
|
610
|
+
return false;
|
|
611
|
+
},
|
|
612
|
+
|
|
613
|
+
get: function(name, namespace){
|
|
614
|
+
var map = namespace ? this.namespaces[namespace] : this.noNamespace;
|
|
615
|
+
if (map){
|
|
616
|
+
var attr = map[name];
|
|
617
|
+
if (attr){
|
|
618
|
+
return attr.value;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
return null;
|
|
622
|
+
},
|
|
623
|
+
|
|
624
|
+
};
|
|
625
|
+
|
|
521
626
|
})();
|
|
@@ -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.
|
|
6
|
+
"JSBundleVersion": "2023.9.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": "
|
|
14
|
+
"GitRevision": "1a4e4cfebe3671d6605583e7b24ff9665646b58f"
|
|
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.
|
|
4
|
+
"JSBundleVersion": "2023.9.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": "
|
|
12
|
+
"GitRevision": "1a4e4cfebe3671d6605583e7b24ff9665646b58f"
|
|
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.
|
|
6
|
+
"JSBundleVersion": "2023.9.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": "
|
|
14
|
+
"GitRevision": "1a4e4cfebe3671d6605583e7b24ff9665646b58f"
|
|
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.
|
|
4
|
+
"JSBundleVersion": "2023.9.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": "
|
|
11
|
+
"GitRevision": "1a4e4cfebe3671d6605583e7b24ff9665646b58f"
|
|
12
12
|
}
|
package/Node/Resources.js
CHANGED
|
@@ -382,9 +382,9 @@ var addMetadata = {
|
|
|
382
382
|
metadata.image = {
|
|
383
383
|
vector: true
|
|
384
384
|
};
|
|
385
|
-
var parser = JSXMLParser.
|
|
386
|
-
parser.
|
|
387
|
-
|
|
385
|
+
var parser = JSXMLParser.initWithString(xml);
|
|
386
|
+
parser.delegate = {
|
|
387
|
+
xmlParserDidBeginElement: function(parser, name, prefix, namespace, attributes){
|
|
388
388
|
var multiple = {
|
|
389
389
|
'em': 12,
|
|
390
390
|
'ex': 24,
|
|
@@ -414,25 +414,22 @@ var addMetadata = {
|
|
|
414
414
|
return multiple[unit] * n;
|
|
415
415
|
};
|
|
416
416
|
if (namespace == 'http://www.w3.org/2000/svg' && name.toLowerCase() == 'svg'){
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
metadata.image.width = px(attrs.width);
|
|
426
|
-
metadata.image.height = px(attrs.height);
|
|
427
|
-
}else if (attrs.viewBox){
|
|
428
|
-
var box = attrs.viewBox.split(/\s+/).map(n => parseInt(n));
|
|
417
|
+
let width = attributes.get("width");
|
|
418
|
+
let height = attributes.get("height");
|
|
419
|
+
let viewBox = attributes.get("viewBox");
|
|
420
|
+
if (width && height){
|
|
421
|
+
metadata.image.width = px(width);
|
|
422
|
+
metadata.image.height = px(height);
|
|
423
|
+
}else if (viewBox){
|
|
424
|
+
var box = viewBox.split(/\s+/).map(n => parseInt(n));
|
|
429
425
|
metadata.image.width = box[2];
|
|
430
426
|
metadata.image.height = box[3];
|
|
431
427
|
}
|
|
432
428
|
}
|
|
433
429
|
parser.stop();
|
|
434
430
|
}
|
|
435
|
-
}
|
|
431
|
+
};
|
|
432
|
+
parser.parse();
|
|
436
433
|
},
|
|
437
434
|
|
|
438
435
|
'.ttf': async function(name, contents, metadata){
|
|
@@ -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.
|
|
6
|
+
"JSBundleVersion": "2023.9.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": "
|
|
13
|
+
"GitRevision": "1a4e4cfebe3671d6605583e7b24ff9665646b58f"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [
|
|
16
16
|
{
|
|
@@ -56,6 +56,7 @@ JSClass("CHAreaChart", CHCategoryChart, {
|
|
|
56
56
|
}
|
|
57
57
|
context.setLineWidth(series.style.lineWidth);
|
|
58
58
|
context.setLineCap(series.style.lineCap);
|
|
59
|
+
context.setLineJoin(series.style.lineJoin);
|
|
59
60
|
if (series.style.lineDashLengths !== null){
|
|
60
61
|
context.setLineDash(0, series.style.lineDashLengths);
|
|
61
62
|
}
|
|
@@ -164,6 +165,7 @@ JSClass("CHAreaChart", CHCategoryChart, {
|
|
|
164
165
|
}
|
|
165
166
|
context.setLineWidth(series.style.lineWidth);
|
|
166
167
|
context.setLineCap(series.style.lineCap);
|
|
168
|
+
context.setLineJoin(series.style.lineJoin);
|
|
167
169
|
if (series.style.lineDashLengths !== null){
|
|
168
170
|
context.setLineDash(0, series.style.lineDashLengths);
|
|
169
171
|
}
|
|
@@ -47,6 +47,7 @@ JSClass("CHLineChart", CHCategoryChart, {
|
|
|
47
47
|
context.setStrokeColor(series.style.color);
|
|
48
48
|
context.setLineWidth(series.style.lineWidth);
|
|
49
49
|
context.setLineCap(series.style.lineCap);
|
|
50
|
+
context.setLineJoin(series.style.lineJoin);
|
|
50
51
|
if (series.style.lineDashLengths !== null){
|
|
51
52
|
context.setLineDash(0, series.style.lineDashLengths);
|
|
52
53
|
}
|
|
@@ -117,6 +118,7 @@ JSClass("CHLineChart", CHCategoryChart, {
|
|
|
117
118
|
context.setStrokeColor(series.style.color);
|
|
118
119
|
context.setLineWidth(series.style.lineWidth);
|
|
119
120
|
context.setLineCap(series.style.lineCap);
|
|
121
|
+
context.setLineJoin(series.style.lineJoin);
|
|
120
122
|
if (series.style.lineDashLengths !== null){
|
|
121
123
|
context.setLineDash(0, series.style.lineDashLengths);
|
|
122
124
|
}
|
|
@@ -108,6 +108,7 @@ JSClass("CHStackedAreaChart", CHAreaChart, {
|
|
|
108
108
|
}
|
|
109
109
|
context.setLineWidth(series.style.lineWidth);
|
|
110
110
|
context.setLineCap(series.style.lineCap);
|
|
111
|
+
context.setLineJoin(series.style.lineJoin);
|
|
111
112
|
if (series.style.lineDashLengths !== null){
|
|
112
113
|
context.setLineDash(0, series.style.lineDashLengths);
|
|
113
114
|
}
|