@breakside/jskit 2023.21.0 → 2023.22.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/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 +9 -7
- package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
- 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 +21 -120
- 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/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/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 +9 -7
- 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/UIHTMLApplication.js +2 -0
- package/Root/Frameworks/UIKit/UIListView.js +4 -2
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
4
|
-
"JSBundleVersion": "2023.
|
|
4
|
+
"JSBundleVersion": "2023.22.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "DOM+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": "c5e74a677a557876be14d6e2bf15b95202dcea6e"
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
6
|
-
"JSBundleVersion": "2023.
|
|
6
|
+
"JSBundleVersion": "2023.22.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
|
|
|
11
11
|
"node": "DOM+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": "c5e74a677a557876be14d6e2bf15b95202dcea6e"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [],
|
|
17
17
|
"ResourceLookup": {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.FontKit",
|
|
4
|
-
"JSBundleVersion": "2023.
|
|
4
|
+
"JSBundleVersion": "2023.22.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
8
8
|
"html": "FontKit+HTML.js"
|
|
9
9
|
},
|
|
10
10
|
"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",
|
|
11
|
-
"GitRevision": "
|
|
11
|
+
"GitRevision": "c5e74a677a557876be14d6e2bf15b95202dcea6e"
|
|
12
12
|
}
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.JSKit.FontKit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.FontKit",
|
|
6
|
-
"JSBundleVersion": "2023.
|
|
6
|
+
"JSBundleVersion": "2023.22.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
10
10
|
"html": "FontKit+HTML.js"
|
|
11
11
|
},
|
|
12
12
|
"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",
|
|
13
|
-
"GitRevision": "
|
|
13
|
+
"GitRevision": "c5e74a677a557876be14d6e2bf15b95202dcea6e"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [],
|
|
16
16
|
"ResourceLookup": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.Foundation",
|
|
4
|
-
"JSBundleVersion": "2023.
|
|
4
|
+
"JSBundleVersion": "2023.22.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "Foundation+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": "c5e74a677a557876be14d6e2bf15b95202dcea6e"
|
|
13
13
|
}
|
|
@@ -417,16 +417,18 @@ _JSDataImage.sizeFromSVGData = function(data){
|
|
|
417
417
|
return multiple[unit] * n;
|
|
418
418
|
};
|
|
419
419
|
if (namespace == 'http://www.w3.org/2000/svg' && name.toLowerCase() == 'svg'){
|
|
420
|
-
var width = attributes.get("width");
|
|
421
|
-
var height = attributes.get("height");
|
|
420
|
+
var width = px(attributes.get("width"));
|
|
421
|
+
var height = px(attributes.get("height"));
|
|
422
422
|
var viewBox = attributes.get("viewBox");
|
|
423
|
-
if (width && height){
|
|
424
|
-
size.width =
|
|
425
|
-
size.height =
|
|
423
|
+
if (width !== undefined && height !== undefined){
|
|
424
|
+
size.width = width;
|
|
425
|
+
size.height = height;
|
|
426
426
|
}else if (viewBox){
|
|
427
427
|
var box = viewBox.split(/\s+/).map(function(n){ return parseInt(n); });
|
|
428
|
-
|
|
429
|
-
|
|
428
|
+
if (!isNaN(box[2]) && !isNaN(box[3])){
|
|
429
|
+
size.width = box[2];
|
|
430
|
+
size.height = box[3];
|
|
431
|
+
}
|
|
430
432
|
}
|
|
431
433
|
}
|
|
432
434
|
parser.stop();
|
|
@@ -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.22.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": "c5e74a677a557876be14d6e2bf15b95202dcea6e"
|
|
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.22.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": "c5e74a677a557876be14d6e2bf15b95202dcea6e"
|
|
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.22.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": "c5e74a677a557876be14d6e2bf15b95202dcea6e"
|
|
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.22.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": "c5e74a677a557876be14d6e2bf15b95202dcea6e"
|
|
12
12
|
}
|
package/Node/Resources.js
CHANGED
|
@@ -291,136 +291,37 @@ var addMetadata = {
|
|
|
291
291
|
},
|
|
292
292
|
|
|
293
293
|
'.png': async function(name, contents, metadata){
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
contents[1] == 0x50 &&
|
|
298
|
-
contents[2] == 0x4E &&
|
|
299
|
-
contents[3] == 0x47 &&
|
|
300
|
-
contents[4] == 0x0D &&
|
|
301
|
-
contents[5] == 0x0A &&
|
|
302
|
-
contents[6] == 0x1A &&
|
|
303
|
-
contents[7] == 0x0A &&
|
|
304
|
-
|
|
305
|
-
// IHDR
|
|
306
|
-
contents[12] == 0x49 &&
|
|
307
|
-
contents[13] == 0x48 &&
|
|
308
|
-
contents[14] == 0x44 &&
|
|
309
|
-
contents[15] == 0x52)
|
|
310
|
-
{
|
|
311
|
-
var dataView = contents.dataView();
|
|
294
|
+
var contentType = JSImage.contentTypeOfData(contents);
|
|
295
|
+
if (contentType !== null && contentType.subtype === "png"){
|
|
296
|
+
var image = JSImage.initWithData(contents);
|
|
312
297
|
metadata.image = {
|
|
313
|
-
width:
|
|
314
|
-
height:
|
|
298
|
+
width: image.size.width,
|
|
299
|
+
height: image.size.height
|
|
315
300
|
};
|
|
316
301
|
}
|
|
317
302
|
},
|
|
318
303
|
|
|
319
304
|
'.jpg': async function(name, contents, metadata){
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
var l = contents.length;
|
|
328
|
-
var blockLength;
|
|
329
|
-
var blockdata;
|
|
330
|
-
while (i < l){
|
|
331
|
-
b = contents[i++];
|
|
332
|
-
if (b != 0xFF){
|
|
333
|
-
// TODO: Error, not at a maker
|
|
334
|
-
return;
|
|
335
|
-
}
|
|
336
|
-
if (i == l){
|
|
337
|
-
// TODO: Error, not enough room for marker
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
b = contents[i++];
|
|
341
|
-
if (b == 0x00){
|
|
342
|
-
// TODO: Error, invalid marker
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
// D0-D9 are standalone markers...make sure not to look for a length
|
|
346
|
-
if (b < 0xD0 || b > 0xD9){
|
|
347
|
-
if (i >= l - 2){
|
|
348
|
-
// TODO: Error, not enough room for block header
|
|
349
|
-
return;
|
|
350
|
-
}
|
|
351
|
-
blockLength = dataView.getUint16(i);
|
|
352
|
-
if (i + blockLength > l){
|
|
353
|
-
// TODO: Error, not enough room for block data
|
|
354
|
-
return;
|
|
355
|
-
}
|
|
356
|
-
// C0-CF are start of frame blocks, expect for C4 and CC
|
|
357
|
-
// start of frame blocks have image sizes
|
|
358
|
-
if (b >= 0xC0 && b <= 0xCF && b != 0xC4 && b != 0xCC){
|
|
359
|
-
if (blockLength >= 7){
|
|
360
|
-
metadata.image = {
|
|
361
|
-
height: dataView.getUint16(i + 3),
|
|
362
|
-
width: dataView.getUint16(i + 5)
|
|
363
|
-
};
|
|
364
|
-
}
|
|
365
|
-
return;
|
|
366
|
-
}
|
|
367
|
-
i += blockLength;
|
|
368
|
-
}
|
|
305
|
+
var contentType = JSImage.contentTypeOfData(contents);
|
|
306
|
+
if (contentType !== null && contentType.subtype === "jpeg"){
|
|
307
|
+
var image = JSImage.initWithData(contents);
|
|
308
|
+
metadata.image = {
|
|
309
|
+
width: image.size.width,
|
|
310
|
+
height: image.size.height
|
|
311
|
+
};
|
|
369
312
|
}
|
|
370
313
|
},
|
|
371
314
|
|
|
372
315
|
'.svg': async function(name, contents, metadata){
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
'px': 1,
|
|
383
|
-
'in': 72,
|
|
384
|
-
'cm': 72/2.54,
|
|
385
|
-
'mm': 72/25.4,
|
|
386
|
-
'pt': 1,
|
|
387
|
-
'pc': 12
|
|
388
|
-
};
|
|
389
|
-
var px = function(length){
|
|
390
|
-
if (length === undefined || length === null){
|
|
391
|
-
return undefined;
|
|
392
|
-
}
|
|
393
|
-
var matches = length.match(/^\s*(\d+)\s*(em|ex|px|in|cm|mm|pt|pc|%)?\s*$/);
|
|
394
|
-
if (!matches){
|
|
395
|
-
return undefined;
|
|
396
|
-
}
|
|
397
|
-
let n = parseInt(matches[1]);
|
|
398
|
-
if (!matches[2]){
|
|
399
|
-
return n;
|
|
400
|
-
}
|
|
401
|
-
let unit = matches[2];
|
|
402
|
-
if (unit == '%'){
|
|
403
|
-
return undefined;
|
|
404
|
-
}
|
|
405
|
-
return multiple[unit] * n;
|
|
406
|
-
};
|
|
407
|
-
if (namespace == 'http://www.w3.org/2000/svg' && name.toLowerCase() == 'svg'){
|
|
408
|
-
let width = attributes.get("width");
|
|
409
|
-
let height = attributes.get("height");
|
|
410
|
-
let viewBox = attributes.get("viewBox");
|
|
411
|
-
if (width && height){
|
|
412
|
-
metadata.image.width = px(width);
|
|
413
|
-
metadata.image.height = px(height);
|
|
414
|
-
}else if (viewBox){
|
|
415
|
-
var box = viewBox.split(/\s+/).map(n => parseInt(n));
|
|
416
|
-
metadata.image.width = box[2];
|
|
417
|
-
metadata.image.height = box[3];
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
parser.stop();
|
|
421
|
-
}
|
|
422
|
-
};
|
|
423
|
-
parser.parse();
|
|
316
|
+
var contentType = JSImage.contentTypeOfData(contents);
|
|
317
|
+
if (contentType !== null && contentType.subtype === "svg+xml"){
|
|
318
|
+
var image = JSImage.initWithData(contents);
|
|
319
|
+
metadata.image = {
|
|
320
|
+
vector: true,
|
|
321
|
+
width: image.size.width,
|
|
322
|
+
height: image.size.height
|
|
323
|
+
};
|
|
324
|
+
}
|
|
424
325
|
},
|
|
425
326
|
|
|
426
327
|
'.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.22.0",
|
|
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": "c5e74a677a557876be14d6e2bf15b95202dcea6e"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [
|
|
16
16
|
{
|
|
@@ -417,16 +417,18 @@ _JSDataImage.sizeFromSVGData = function(data){
|
|
|
417
417
|
return multiple[unit] * n;
|
|
418
418
|
};
|
|
419
419
|
if (namespace == 'http://www.w3.org/2000/svg' && name.toLowerCase() == 'svg'){
|
|
420
|
-
var width = attributes.get("width");
|
|
421
|
-
var height = attributes.get("height");
|
|
420
|
+
var width = px(attributes.get("width"));
|
|
421
|
+
var height = px(attributes.get("height"));
|
|
422
422
|
var viewBox = attributes.get("viewBox");
|
|
423
|
-
if (width && height){
|
|
424
|
-
size.width =
|
|
425
|
-
size.height =
|
|
423
|
+
if (width !== undefined && height !== undefined){
|
|
424
|
+
size.width = width;
|
|
425
|
+
size.height = height;
|
|
426
426
|
}else if (viewBox){
|
|
427
427
|
var box = viewBox.split(/\s+/).map(function(n){ return parseInt(n); });
|
|
428
|
-
|
|
429
|
-
|
|
428
|
+
if (!isNaN(box[2]) && !isNaN(box[3])){
|
|
429
|
+
size.width = box[2];
|
|
430
|
+
size.height = box[3];
|
|
431
|
+
}
|
|
430
432
|
}
|
|
431
433
|
}
|
|
432
434
|
parser.stop();
|
|
@@ -305,6 +305,8 @@ JSGlobalObject.UIApplicationMain = function(rootElement, bootstrapper){
|
|
|
305
305
|
application.run(function(error){
|
|
306
306
|
if (error === null){
|
|
307
307
|
application.addEventListeners();
|
|
308
|
+
}else{
|
|
309
|
+
application.windowServer.stop();
|
|
308
310
|
}
|
|
309
311
|
if (bootstrapper){
|
|
310
312
|
bootstrapper.applicationLaunchResult(application, error);
|
|
@@ -535,9 +535,10 @@ JSClass("UIListView", UIScrollView, {
|
|
|
535
535
|
},
|
|
536
536
|
|
|
537
537
|
_approximateYForVisibleItem: function(item){
|
|
538
|
+
var y;
|
|
538
539
|
if (item.kind === VisibleItem.Kind.cell){
|
|
539
540
|
var row = this._sectionRowForIndexPath(item.indexPath);
|
|
540
|
-
|
|
541
|
+
y = this._approximateYForSection(item.indexPath.section);
|
|
541
542
|
y += this._approximateYForSectionRow(item.indexPath.section, row);
|
|
542
543
|
return y;
|
|
543
544
|
}
|
|
@@ -545,7 +546,8 @@ JSClass("UIListView", UIScrollView, {
|
|
|
545
546
|
return this._approximateYForSection(item.indexPath.section);
|
|
546
547
|
}
|
|
547
548
|
if (item.kind === VisibleItem.Kind.footer){
|
|
548
|
-
|
|
549
|
+
y = this._approximateYForSection(item.indexPath.section);
|
|
550
|
+
return y + this._approximateYForSectionFooter(item.indexPath.section);
|
|
549
551
|
}
|
|
550
552
|
return 0;
|
|
551
553
|
},
|