@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.
Files changed (40) 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/JSImage.js +9 -7
  7. package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
  8. package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
  9. package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
  10. package/Info.json +2 -2
  11. package/Node/Resources.js +21 -120
  12. package/Node/io.breakside.jskit-bundle.js +2 -2
  13. package/Root/Frameworks/APIKit/Info.yaml +1 -1
  14. package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
  15. package/Root/Frameworks/AuthKit/Info.yaml +1 -1
  16. package/Root/Frameworks/CSSOM/Info.yaml +1 -1
  17. package/Root/Frameworks/ChartKit/Info.yaml +1 -1
  18. package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
  19. package/Root/Frameworks/DBKit/Info.yaml +1 -1
  20. package/Root/Frameworks/DOM/Info.yaml +1 -1
  21. package/Root/Frameworks/Dispatch/Info.yaml +1 -1
  22. package/Root/Frameworks/FontKit/Info.yaml +1 -1
  23. package/Root/Frameworks/Foundation/Info.yaml +1 -1
  24. package/Root/Frameworks/Foundation/JSImage.js +9 -7
  25. package/Root/Frameworks/ImageKit/Info.yaml +1 -1
  26. package/Root/Frameworks/MediaKit/Info.yaml +1 -1
  27. package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
  28. package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
  29. package/Root/Frameworks/PDFKit/Info.yaml +1 -1
  30. package/Root/Frameworks/QRKit/Info.yaml +1 -1
  31. package/Root/Frameworks/SearchKit/Info.yaml +1 -1
  32. package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
  33. package/Root/Frameworks/ServerKit/Info.yaml +1 -1
  34. package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
  35. package/Root/Frameworks/TestKit/Info.yaml +1 -1
  36. package/Root/Frameworks/UIKit/Info.yaml +1 -1
  37. package/Root/Frameworks/UIKit/UIHTMLApplication.js +2 -0
  38. package/Root/Frameworks/UIKit/UIListView.js +4 -2
  39. package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
  40. 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.21.0",
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": "af89e2c41e4ddad1c493c9ccfd577f76dde0520b"
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.21.0",
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": "af89e2c41e4ddad1c493c9ccfd577f76dde0520b"
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.21.0",
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": "af89e2c41e4ddad1c493c9ccfd577f76dde0520b"
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.21.0",
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": "af89e2c41e4ddad1c493c9ccfd577f76dde0520b"
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.21.0",
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": "af89e2c41e4ddad1c493c9ccfd577f76dde0520b"
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 = px(width);
425
- size.height = px(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
- size.width = box[2];
429
- size.height = box[3];
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.21.0",
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": "af89e2c41e4ddad1c493c9ccfd577f76dde0520b"
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.21.0",
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": "af89e2c41e4ddad1c493c9ccfd577f76dde0520b"
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.21.0",
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": "af89e2c41e4ddad1c493c9ccfd577f76dde0520b"
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.21.0",
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": "af89e2c41e4ddad1c493c9ccfd577f76dde0520b"
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
- if (contents.length >= 24 &&
295
- // magic
296
- contents[0] == 0x89 &&
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: dataView.getUint32(16),
314
- height: dataView.getUint32(20)
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
- if (contents.length < 2 || contents[0] != 0xFF || contents[1] != 0xD8){
321
- // not a jpeg
322
- return;
323
- }
324
- var dataView = contents.dataView();
325
- var i = 0;
326
- var b;
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
- metadata.image = {
374
- vector: true
375
- };
376
- var parser = JSXMLParser.initWithData(contents);
377
- parser.delegate = {
378
- xmlParserDidBeginElement: function(parser, name, prefix, namespace, attributes){
379
- var multiple = {
380
- 'em': 12,
381
- 'ex': 24,
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.21.0",
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": "af89e2c41e4ddad1c493c9ccfd577f76dde0520b"
13
+ "GitRevision": "c5e74a677a557876be14d6e2bf15b95202dcea6e"
14
14
  },
15
15
  "Resources": [
16
16
  {
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.APIKit
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
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: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.AuthKit
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.CSSOM
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ChartKit
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2021 Breakside Inc.
6
6
  # JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ConferenceKit
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.DBKit
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.DOM
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.Dispatch
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSCopyright: Copyright © 2020 Breakside Inc.
5
5
  JSBundleEnvironments:
6
6
  html: Dispatch+HTML.js
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.FontKit
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.Foundation
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -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 = px(width);
425
- size.height = px(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
- size.width = box[2];
429
- size.height = box[3];
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();
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ImageKit
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.MediaKit
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.MediaKitUI
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.NotificationKit
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2021 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.PDFKit
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.QRKit
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.SearchKit
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.SecurityKit
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ServerKit
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ServerKitTesting
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.TestKit
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.UIKit
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -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
- var y = this._approximateYForSection(item.indexPath.section);
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
- return this._approximateYForSectionFooter(item.indexPath.section);
549
+ y = this._approximateYForSection(item.indexPath.section);
550
+ return y + this._approximateYForSectionFooter(item.indexPath.section);
549
551
  }
550
552
  return 0;
551
553
  },
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.UIKitTesting
3
- JSBundleVersion: 2023.21.0
3
+ JSBundleVersion: 2023.22.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "node": ">=10.10.0"
10
10
  },
11
11
  "name": "@breakside/jskit",
12
- "version": "2023.21.0",
12
+ "version": "2023.22.0",
13
13
  "license": "SEE LICENSE IN LICENSE.txt",
14
14
  "files": [
15
15
  "*"